> ## Documentation Index
> Fetch the complete documentation index at: https://stytch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft

> Set up Microsoft OAuth for Consumer Authentication.

## Setup

*Follow these steps if you have not created a Microsoft OAuth client yet.*

1. Create a [Microsoft Azure account](https://login.microsoftonline.com/) if you have not already done so.
2. Navigate to [Azure Active Directory](https://portal.azure.com/#blade/Microsoft%5FAAD%5FIAM/ActiveDirectoryMenuBlade/RegisteredApps) to create a Microsoft application.
3. Click **New registration**. <img src="https://mintcdn.com/stytch-34ca0595/ujkFjtNfcCtlcK2E/images/consumer/from-old-docs/microsoft-new-registration.webp?fit=max&auto=format&n=ujkFjtNfcCtlcK2E&q=85&s=48cc8f93e9279de45e85d45cf1868203" alt="New Microsoft Registration" width="883" height="152" data-path="images/consumer/from-old-docs/microsoft-new-registration.webp" />
4. Enter a name for your OAuth client.
5. Select "Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)". <img src="https://mintcdn.com/stytch-34ca0595/ujkFjtNfcCtlcK2E/images/consumer/from-old-docs/microsoft-select-account-type.webp?fit=max&auto=format&n=ujkFjtNfcCtlcK2E&q=85&s=36c2172aa73cd03829f9309744e04be7" alt="Select Account Type" width="1636" height="330" data-path="images/consumer/from-old-docs/microsoft-select-account-type.webp" />
6. Under the **Redirect URI** section, select **Web** and then copy-paste the Stytch redirect URI from the [OAuth page](https://stytch.com/dashboard/oauth) into the URI field. <img src="https://mintcdn.com/stytch-34ca0595/ujkFjtNfcCtlcK2E/images/consumer/from-old-docs/microsoft-redirect-uri.webp?fit=max&auto=format&n=ujkFjtNfcCtlcK2E&q=85&s=a2f612e0071b3f8e09bb45a2ad9a7f8d" alt="Redirect URI" width="1650" height="286" data-path="images/consumer/from-old-docs/microsoft-redirect-uri.webp" />
7. Click **Register** to save the configuration.

***

*Follow these steps if you already have an existing Microsoft OAuth client.*

1. Navigate to [Azure Active Directory](https://portal.azure.com/#blade/Microsoft%5FAAD%5FIAM/ActiveDirectoryMenuBlade/RegisteredApps) and select your Microsoft application.
2. Ensure that the **Supported account types** section is set to "All Microsoft account users". If it's not, navigate to the **Manifest** tab, set the "signInAudience" value to "AzureADandPersonalMicrosoftAccount", and save. <img src="https://mintcdn.com/stytch-34ca0595/ujkFjtNfcCtlcK2E/images/consumer/from-old-docs/microsoft-supported-account-types.webp?fit=max&auto=format&n=ujkFjtNfcCtlcK2E&q=85&s=deb52a5fc170efb3d3e2f690102aef26" alt="Supported Account Types" width="1016" height="538" data-path="images/consumer/from-old-docs/microsoft-supported-account-types.webp" /> <img src="https://mintcdn.com/stytch-34ca0595/ujkFjtNfcCtlcK2E/images/consumer/from-old-docs/microsoft-sign-in-audience.webp?fit=max&auto=format&n=ujkFjtNfcCtlcK2E&q=85&s=177108e82bbf2ff461febaf1b760a1cd" alt="Sign in audience" width="858" height="194" data-path="images/consumer/from-old-docs/microsoft-sign-in-audience.webp" />
3. In your OAuth client configuration, select the link next to the **Redirect URIs** section. Then select **Add a platform** and finally select **Web**. <img src="https://mintcdn.com/stytch-34ca0595/ujkFjtNfcCtlcK2E/images/consumer/from-old-docs/microsoft-add-a-redirect-uri.webp?fit=max&auto=format&n=ujkFjtNfcCtlcK2E&q=85&s=0ca3e2f261afae0641a9cc258d1207ef" alt="Add a redirect URI" width="1058" height="178" data-path="images/consumer/from-old-docs/microsoft-add-a-redirect-uri.webp" /> <img src="https://mintcdn.com/stytch-34ca0595/ujkFjtNfcCtlcK2E/images/consumer/from-old-docs/microsoft-add-a-platform.webp?fit=max&auto=format&n=ujkFjtNfcCtlcK2E&q=85&s=e05e196816030c941ea6b856a9fd7b73" alt="Add a platform" width="1514" height="474" data-path="images/consumer/from-old-docs/microsoft-add-a-platform.webp" />
4. Copy-paste the Stytch redirect URI from the [Dashboard](https://stytch.com/dashboard/oauth) into the URI field. <img src="https://mintcdn.com/stytch-34ca0595/ujkFjtNfcCtlcK2E/images/consumer/from-old-docs/microsoft-configure-web-redirect-uris.webp?fit=max&auto=format&n=ujkFjtNfcCtlcK2E&q=85&s=f36107101d1481b8c635d0af9d264552" alt="Configure redirect URIs" width="584" height="386" data-path="images/consumer/from-old-docs/microsoft-configure-web-redirect-uris.webp" />
5. Click **Configure** to save the URI.
