> ## 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**. ![New Microsoft Registration](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)
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)". ![Select Account Type](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)
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. ![Redirect URI](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)
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. ![Supported Account Types](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) ![Sign in audience](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)
3. In your OAuth client configuration, select the link next to the **Redirect URIs** section. Then select **Add a platform** and finally select **Web**. ![Add a redirect URI](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) ![Add a platform](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)
4. Copy-paste the Stytch redirect URI from the [Dashboard](https://stytch.com/dashboard/oauth) into the URI field. ![Configure redirect URIs](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)
5. Click **Configure** to save the URI.
