Set up sign-up and sign-in with a GitHub account using Azure Active Directory B2C


This feature is in public preview.

Create a GitHub OAuth application

To use a GitHub 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 GitHub account, you can sign up at

  1. Sign in to the GitHub Developer website with your GitHub credentials.
  2. Select OAuth Apps and then select New OAuth App.
  3. Enter an Application name and your Homepage URL.
  4. Enter in Authorization callback URL. Replace your-tenant-name with the name of your Azure AD B2C tenant. Use all lowercase letters when entering your tenant name even if the tenant is defined with uppercase letters in Azure AD B2C.
  5. Click Register application.
  6. Copy the values of Client ID and Client Secret. You need both to add the identity provider to your tenant.

Configure a GitHub account as an identity provider

  1. Sign in to the Azure portal as the global administrator of your Azure AD B2C tenant.
  2. 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.
  3. Choose All services in the top-left corner of the Azure portal, search for and select Azure AD B2C.
  4. Select Identity providers, then select GitHub (Preview).
  5. Enter a Name. For example, GitHub.
  6. For the Client ID, enter the Client ID of the GitHub application that you created earlier.
  7. For the Client secret, enter the Client Secret that you recorded.
  8. Select Save.