Set up the Microsoft provider
Microsoft is one of the OAuth 2.0 identity providers you can use to authenticate visitors to your Power Pages site. OAuth 2.0–based identity providers require a client ID, client secret, and sometimes a redirect or reply URL. This article describes the following steps:
- Set up Microsoft in Power Pages
- Create an app registration in Azure
- Enter site settings in Power Pages
Set up Microsoft in Power Pages
Set Microsoft as an identity provider for your site.
In your Power Pages site, select Set up > Identity providers.
If no identity providers appear, make sure External login is set to On in your site's general authentication settings.
To the right of Microsoft, select More Commands (…) > Configure or select the provider name.
Leave the provider name as it is or change it if you like.
The provider name is the text on the button that users see when they select their identity provider on the sign-in page.
Under Reply URL, select Copy.
Select Open Microsoft.
Don't close your Power Pages browser tab. You'll return to it soon.
Create a Microsoft app registration in Azure
Register an application with your site's reply URL as the redirect URI.
If you use or add a custom domain name or change your site's base URL, you must set up your identity provider to use the correct reply URL. The Microsoft app uses the reply URL to redirect users to your website after authentication.
In the Azure portal, select New registration.
Enter a name.
Select one of the Supported account types that best reflects your organization requirements.
Under Redirect URI, select Web as the platform, and then paste the reply URL you copied over the example in the box.
Copy the Application (client) ID.
To the right of Client credentials, select Add a certificate or secret.
Select + New client secret.
Enter an optional description, select an expiration, and then select Add.
Under Secret ID, select the Copy to clipboard icon.
Enter site settings in Power Pages
Return to the Power Pages Configure identity provider page you left earlier.
Under Configure site settings, paste the following values:
- Client ID: Paste the Application (client) ID you copied.
- Client secret: Paste the Secret ID you copied.