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 (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 get it 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 Add New App.
- Enter a Display Name and a valid Contact Email.
- Click 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.
- Click 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. Click Save Changes at the bottom of the page.
- To make your Facebook application available to Azure AD B2C, click the Status selector at the top right of the page and turn it On to make the Application public, and then click Confirm. 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 clicking the Directory and 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, and then select Add.
- Enter a Name. For example, enter Facebook.
- Select Identity provider type, select Facebook, and click OK.
- Select Set up this identity provider and enter the App ID that you recorded earlier as the Client ID and enter the App Secret that you recorded as the Client secret of the Facebook application that you created earlier.
- Click OK and then click Create to save your Facebook configuration.