Set up sign-up and sign-in with a Twitter account using Azure Active Directory B2C
Create an application
To use Twitter as an identity provider in Azure AD B2C, you need to create a Twitter application. If you don't already have a Twitter account, you can sign up at https://twitter.com/signup.
- Sign in to the Twitter Developers website with your Twitter account credentials.
- Select Create an app.
- Enter an App name and an Application description.
- In Website URL, enter
your-tenantwith the name of your tenant. For example,
- For the Callback URL, enter
your-tenantwith the name of your tenant name and
your-user-flow-Idwith the identifier of your user flow. For example,
b2c_1A_signup_signin_twitter. You need to use all lowercase letters when entering your tenant name and user flow id even if they are defined with uppercase letters in Azure AD B2C.
- At the bottom of the page, read and accept the terms, and then select Create.
- On the App details page, select Edit > Edit details, check the box for Enable Sign in with Twitter, and then select Save.
- Select Keys and tokens and record the Consumer API Key and the Consumer API secret key values to be used later.
Configure Twitter as an identity provider in your tenant
- 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 Twitter.
- Enter a Name. For example, Twitter.
- For the Client ID, enter the Consumer API Key of the Twitter application that you created earlier.
- For the Client secret, enter the Consumer API secret key that you recorded.
- Select Save.