Linking a GitHub account

GitHub identity support lets you use your existing GitHub account as a credential for a new or existing Microsoft account, linking your GitHub account with your Microsoft account. 

When you sign in with GitHub, Microsoft checks whether any email addresses associated with your GitHub account match an existing personal or enterprise Microsoft account. If the address matches your enterprise account, you'll be prompted to sign in to that account instead. If the address matches a personal account, we’ll add your GitHub account as a sign-in method to that personal account.

After your GitHub and Microsoft account credentials are linked, you can use that single sign-in anywhere a personal Microsoft account can be used, like on Azure sites, Office apps, and Xbox. These accounts can also be used for Azure Active Directory guest logins as a Microsoft account, assuming the email address matches the one on the invite. 

Troubleshooting tips for linking a GitHub account

Here are some problems that could appear after you link your GitHub and Microsoft accounts.

Common sign-in issues

You can recover your GitHub account by going to Reset your password. Or, you can recover your GitHub-linked Microsoft account by entering your GitHub account’s email address at Recover your account.

If you don’t have any other credentials on your Microsoft account (like a password, Authenticator app, or security key), you can recover your Microsoft account by using the email address attached to it. To get started, go to Recover your account. You’ll have to add a password to your account so we'll know how to log you in later. 

Type the GitHub account email address you chose when you created your GitHub-linked Microsoft account. We’ll look you up and send you to GitHub for sign-in. Or, if there’s a Sign-in options link on the sign in page, use the Sign in with GitHub button that's shown after you click that link. 

Not all Microsoft products can access GitHub.com from their sign-in page—for example, Xbox consoles. Instead, when you type the email address from your linked GitHub account, we’ll send a code to that address so we can verify it’s really you. You’re still signing in to the same account, just by a different sign-in method. 

Not at all. This doesn’t change your GitHub password; you’ll just have another way to sign in to your Microsoft account. Whenever you sign in using your email address, we’ll offer you the choice of signing in with your Microsoft account password or going to GitHub to sign in. We strongly recommend that, if you need to add a password, you make sure it’s different from the password for your GitHub account.

Note: Linking a GitHub identity to a Microsoft account doesn't give Microsoft any code access. When apps such as Azure DevOps and Visual Studio require access to your code repositories, you'll be prompted to grant specific consent for this access. 

See also

Link your Google and Microsoft accounts

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.