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 get it 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, https://contosob2c.b2clogin.com.
- For the Callback URL, enter
your-tenantwith the name of your tenant name and
your-policy-Idwith the identifier of your policy. For example,
b2c_1A_signup_signin_twitter. You need to use all lowercase letters when entering your tenant name even if the tenant is 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 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.
- Provide a Name. For example, enter Twitter.
- Select Identity provider type, select Twitter, and click OK.
- Select Set up this identity provider and enter the API Key for the Client ID and the API secret key for the Client secret.
- Click OK, and then click Create to save your Twitter configuration.