September 30th, 2024

Introducing seamless authentication with Power Pages and Microsoft Entra External ID

Today we announce the public preview of Microsoft Entra External ID as an identity provider for Microsoft Power Pages—simplifying authentication for your external-facing apps so that you can focus on building features.

A lot of time can be spent on development when building a website, especially when it comes to figuring out how to authenticate users. Power Pages enables you to get a website up and running within a few minutes, while External ID offers a wide range of resources to secure external identities with extensive customization capabilities. Offering out-of-the-box authentication, External ID enables you to save significant time and effort, allowing you to focus on the rest of the application.

Advantages of using External ID include:

  • Enhanced security: Businesses can ensure secure access for their users, protecting sensitive information and reducing the risk of unauthorized access.
  • Improved user experience: A streamlined authentication process reduces complexity for users, providing a smoother and more intuitive experience.
  • Scalability: The ability to handle large numbers of users and various identity providers makes this integration ideal for businesses of all sizes.

In this blog post, I show you how to set up and run External ID with a Power Pages demo website.

Prerequisites

  1. An external tenant on Microsoft Entra Admin Center.
  2. Ensure you have the Application Administrator role and External ID User Flow Administrator role on Microsoft Entra.
  3. A Power Pages environment or sign up for a 30-day free Power Pages trial. You’ll need either a system administrator or a read-write user account.
  4. A demo site with a sign-up process (you can use the starter layout 1 template from the list of Power Pages templates, which is the one used here).

Set up External ID on your website

  1. Log in to Power Pages and click Edit on the site where you want to configure an External ID provider.
    • Click on Security, then click Configure beside Microsoft Entra External ID.
    • A guided wizard will pop up prompting you to enter configuration details.
  2. Select your provider.
    • Select ‘Microsoft Entra External ID’ as your log in provider.
    • The provider’s name is the label that will appear on the sign-in button. It can be something simple like ‘Microsoft Entra External ID’ or ‘Log in with External ID’.
    • Click Next.
  3. Register your application in the Microsoft Entra Admin Center.
    • Go to the Microsoft Entra Admin Center.
    • Click on App registrations > New registration.
    • Enter a name for your app. For example, ‘power-pages-app’. Select ‘Web’ as your platform and copy the reply URL from Power Pages and paste it in the redirect URL field in the Microsoft Entra Admin Center.
    • Click Register.
    • On the power-pages-app Authentication tab, select ‘Access tokens’ and ‘ID tokens’ and click Save.
    • On the API permissions tab, grant ‘admin’ consent.
  4. Create a user flow.
    • Navigate to External Identities > User flows.
    • Click create New user flow.
    • Give the user flow a name, e.g. ‘Power-pages-user-flow’ and select ’email with password’. Click Create.
  5. Link application to the user flow.
    • On the user flow you just created (power-pages-user-flow), click Applications > Add application. Select your application, in this case it is ‘power-pages-app’, and click Select.
  6. Configure site settings.
    • Go to Applications > App registrations > All applications and select ‘power-pages-app’.
    • Copy and paste the ‘Client ID’ into Power Pages.
    • Click on Endpoints and copy the authority URL and OpenID connect metadata document and paste it into your site settings and click Next.
  7. Optional settings and review.
    • You can leave optional settings and review and click Close.
  8. Make changes visible to your site.
    • Go to Power Platform admin center.
    • Under Site Actions, click on Restart site. A confirmation dialog box will appear. Click Restart. It will take a few minutes to complete and for the changes to be reflected on your site.
    • Open your site URL and head over to the sign- in page. The button you configured in step 2, ‘Microsoft Entra External ID’, will now be visible. Click on it.
    • Sign up a new user with the sign-up flow.
    • At the end of the user flow, you will be directed to complete the registration on the website. Enter the same email address and click Register.
    • Finally, if you have a profile page, you can enter relevant user details, such as first and last name and click Update.

Congratulations! You will now have signed up your first user with External ID on Power Pages.

Let’s recap

You have now successfully set up and signed up your first user to your website.

In this blog post, you have learned how to:

  • create an application and a user flow.
  • link the application to your user flow.
  • configure the Client ID, authority URL, and metadata address on Power Pages.
  • sign up and sign in an External ID user with email and password on your website.

Stay connected

To learn more or test out features in the Microsoft Entra portfolio, visit our developer center. Make sure you subscribe to the Identity developer blog for more insights and to keep up with the latest on all things Identity. And, follow us on YouTube for video overviews, tutorials, and deep dives.

Join our research panel to receive occasional invites to participate in future customer research!

0 comments