Set up the Facebook provider

Facebook 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 Facebook in Power Pages

  1. In your Power Pages site, select Security > Identity providers.

    If no identity providers appear, make sure External login is set to On in your site's general authentication settings.

  2. To the right of Facebook, select More Commands () > Configure or select the provider name.

  3. 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.

  4. Select Next.

  5. Under Reply URL, select Copy.

  6. Select Open Facebook.

    Don't close your Power Pages browser tab. You'll return to it soon.

Create an app registration in Facebook

Register an application in Facebook with your site's reply URL as the redirect URL.

Note

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 Facebook app uses the reply URL to redirect users to your website after authentication.

Create an app in Facebook

  1. Sign in to the Facebook Developers App Dashboard.

  2. Select Create App.

  3. Select Consumer as the app type, and then select Continue.

  4. Enter the name of your app and an email address where you can receive developer notifications from Facebook.

  5. Select Create App.

    If prompted, accept Facebook platform policies and complete an online security check.

  6. Open the Settings > Basic tab and enter the following details:

    • (Optional) App Domains; for example, contoso.powerappsportals.com
    • (Optional) Privacy Policy URL: The URL of your organization's privacy policy, which must be accessible anonymously
    • User Data Deletion: The callback URL or the instructions URL for user data deletion
    • An appropriate App Purpose
  7. Select Add Platform, select Website, and then paste the reply URL you copied.

  8. Select Save Changes.

  9. In the left side panel, select Add Products.

  10. Select Set Up for Facebook Login, and then select Web.

  11. Select Save.

  12. Under Facebook Login, select Settings.

  13. In Valid OAuth redirect URIs, paste the reply URL you copied. ​

  14. Select Save Changes.

Publish the app

  1. In the left side panel, select Settings.

  2. In the notification that starts with "Your app has Standard Access to public_profile," select Get Advanced Access.

    You can also select App Review in the left side panel, and then select Permissions and Features.

  3. Select Get Advanced Access for public_profile.

  4. Confirm the change.

    If prompted, accept Facebook platform policies and complete an online security check.

  5. At the top of the page, select Live for the App Mode.

  6. When prompted, select Start checkup.

  7. Review and confirm the data use certification, certify the compliance policies, and then select Submit.

  8. At the top of the page, select Live for the App Mode.

  9. Select Settings > Basic.

  10. Copy the App ID and App Secret.

Enter site settings in Power Pages

  1. Return to the Power Pages Configure identity provider page you left earlier.

  2. Under Configure site settings, paste the following values:

    • Client ID​: Paste the App ID you copied.
    • Client secret: Paste the App Secret you copied.

Optional additional settings for OAuth 2.0 identity providers

See also

Set up site authentication