Set up sign-up and sign-in with a Facebook account using Azure Active Directory B2C
Create a Facebook application
To use a Facebook account as an identity provider in Azure Active Directory B2C (Azure AD B2C), you need to create an application in your tenant that represents it. If you don't already have a Facebook account, you can sign up at https://www.facebook.com/.
- Sign in to Facebook for developers with your Facebook account credentials.
- If you have not already done so, you need to register as a Facebook developer. To do this, select Get Started on the upper-right corner of the page, accept Facebook's policies, and complete the registration steps.
- Select My Apps and then Create App.
- Enter a Display Name and a valid Contact Email.
- Select Create App ID. This may require you to accept Facebook platform policies and complete an online security check.
- Select Settings > Basic.
- Choose a Category, for example
Business and Pages. This value is required by Facebook, but not used for Azure AD B2C.
- At the bottom of the page, select Add Platform, and then select Website.
- In Site URL, enter
http://www.contoso.com. The policy URL is a page you maintain to provide privacy information for your application.
- Select Save Changes.
- At the top of the page, copy the value of App ID.
- Select Show and copy the value of App Secret. You use both of them to configure Facebook as an identity provider in your tenant. App Secret is an important security credential.
- Select the plus sign next to PRODUCTS, and then select Set up under Facebook Login.
- Under Facebook Login, select Settings.
- In Valid OAuth redirect URIs, enter
your-tenant-namewith the name of your tenant. Select Save Changes at the bottom of the page.
- To make your Facebook application available to Azure AD B2C, select the Status selector at the top right of the page and turn it On to make the Application public, and then select Switch Mode. At this point the Status should change from Development to Live.
Configure a Facebook account as an identity provider
- Sign in to the Azure portal as the global administrator of your Azure AD B2C tenant.
- Make sure you're using the directory that contains your Azure AD B2C tenant by selecting the Directory + subscription filter in the top menu and choosing the directory that contains your tenant.
- Choose All services in the top-left corner of the Azure portal, search for and select Azure AD B2C.
- Select Identity providers, then 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.
- Select Save.