Add Facebook as an identity provider
By setting up federation with Facebook, you can allow customers to sign in to your applications with their own Facebook accounts. After you've added Facebook as one of your application's sign-in options, on the sign-in page, customers can sign-in to Microsoft Entra ID for customers with a Facebook account. (Learn more about authentication methods and identity providers for customers.)
Create a Facebook application
If you don't already have a Facebook account, sign up at https://www.facebook.com. After you sign-up or sign-in with your Facebook account, start the Facebook developer account registration process. For more information, see Register as a Facebook Developer.
- Sign in to Facebook for developers with your Facebook developer account credentials.
- If you haven't already done so, register as a Facebook developer: Select Get Started in the upper-right corner of the page, accept Facebook's policies, and complete the registration steps.
- Select Create App. Select Set up Facebook Login, and then select Next.
- For Select an app type, select Consumer, then select Next.
- Add an app name and a valid app contact mail.
- Select Create app. This step may require you to accept Facebook platform policies and complete an online security check.
- Select Settings > Basic.
- Copy the value of App ID. Then select Show and copy the value of App Secret. You use both of these values to configure Facebook as an identity provider in your tenant. App Secret is an important security credential.
https://www.contoso.com/privacy. The policy URL is a page you maintain to provide privacy information for your application.
- Enter a URL for the Terms of Service URL, for example
https://www.contoso.com/tos. The policy URL is a page you maintain to provide terms and conditions for your application.
- Enter a URL for the User Data Deletion, for example
https://www.contoso.com/delete_my_data. The User Data Deletion URL is a page you maintain to provide away for users to request that their data be deleted.
- Choose a Category, for example
Business and pages. Facebook requires this value, but it's not used by Microsoft Entra ID.
- At the bottom of the page, select Add platform, select Website, and then select Next.
- In Site URL, enter the address of your website, for example
- Select Save changes.
- From the menu, select Products. Next to Facebook Login, select Configure > Settings.
- In Valid OAuth Redirect URIs, enter the following URIs, replacing
<tenant-ID>with your customer tenant ID and
<tenant-name>with your customer tenant name:
To find your customer tenant ID, sign in to the Microsoft Entra admin center. Browse to Identity > Overview. Then select the Overview tab and copy the Tenant ID.
- Select Save changes at the bottom of the page.
- At this point, only Facebook application owners can sign in. Because you registered the app, you can sign in with your Facebook account. To make your Facebook application available to your users, from the menu, select Go live. Follow all of the steps listed to complete all requirements. You'll likely need to complete the business verification to verify your identity as a business entity or organization. For more information, see Meta App Development.
Configure Facebook federation in Microsoft Entra ID for customers
After you create the Facebook application, in this step you set the Facebook client ID and client secret in Microsoft Entra ID. You can use the Azure portal or PowerShell to do so. To configure Facebook federation in the Microsoft Entra admin center, follow these steps:
Sign in to the Microsoft Entra admin center.
Browse to Identity > External Identities > All identity providers.
Select + Facebook.
Enter a Name. For example, Facebook.
For the Client ID, enter the App ID of the Facebook application that you created earlier.
For the Client secret, enter the App Secret that you recorded.
To configure Facebook federation by using PowerShell, follow these steps:
Install the latest version of the Azure AD PowerShell for Graph module (AzureADPreview).
Run the following command:
At the sign-in prompt, sign in with the managed Global Administrator account.
Run the following command:
New-AzureADMSIdentityProvider -Type Facebook -Name Facebook -ClientId <client ID> -ClientSecret <client secret>
Use the client ID and client secret from the app you created in Create a Facebook application step.
Add Facebook identity provider to a user flow
At this point, the Facebook identity provider has been set up in your customer tenant, but it's not yet available in any of the sign-in pages. To add the Facebook identity provider to a user flow:
Browse to Identity > External Identities > User flows.
Select the user flow where you want to add the Facebook identity provider.
Under Settings, select Identity providers
Under Other Identity Providers, select Facebook.
At the top of the pane, select Save.