> ## 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

> Configure Microsoft OAuth for Multi-Tenant Authentication.

## Create a new Microsoft OAuth client

<Steps>
  <Step title="Create a Microsoft Azure account">
    If you don't have one already, create a [Microsoft Azure account](https://login.microsoftonline.com/).
  </Step>

  <Step title="Navigate to Azure Active Directory">
    Go to [Azure Active Directory](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps) to create a Microsoft application.
  </Step>

  <Step title="Create a new registration">
    Click **New registration**.

    <img src="https://mintcdn.com/stytch-34ca0595/ImrCo7c3M8ByeeMn/images/multi-tenant-auth/authentication/oauth/microsoft-new-registration.webp?fit=max&auto=format&n=ImrCo7c3M8ByeeMn&q=85&s=5ad4527b9427ead702c4134922c9ae83" alt="New Microsoft Registration" width="883" height="152" data-path="images/multi-tenant-auth/authentication/oauth/microsoft-new-registration.webp" />
  </Step>

  <Step title="Enter application details">
    Enter a name for your OAuth client.
  </Step>

  <Step title="Select account type">
    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/ImrCo7c3M8ByeeMn/images/multi-tenant-auth/authentication/oauth/microsoft-select-account-type.webp?fit=max&auto=format&n=ImrCo7c3M8ByeeMn&q=85&s=e8c521b172eab5dc052eef30fe19dc79" alt="Select Account Type" width="1636" height="330" data-path="images/multi-tenant-auth/authentication/oauth/microsoft-select-account-type.webp" />
  </Step>

  <Step title="Configure the Redirect URI">
    Under the **Redirect URI** section, select **Web** and then copy the Stytch redirect URI from the [OAuth page](https://stytch.com/dashboard/oauth) and paste it into the URI field.

    <img src="https://mintcdn.com/stytch-34ca0595/ImrCo7c3M8ByeeMn/images/multi-tenant-auth/authentication/oauth/microsoft-redirect-uri.webp?fit=max&auto=format&n=ImrCo7c3M8ByeeMn&q=85&s=78ed1e39e86ee5133de995e3f42daba1" alt="Redirect URI" width="1650" height="286" data-path="images/multi-tenant-auth/authentication/oauth/microsoft-redirect-uri.webp" />
  </Step>

  <Step title="Register the application">
    Click **Register** to save the configuration.
  </Step>
</Steps>

## Configure your Microsoft OAuth client in Stytch

<Steps>
  <Step title="Navigate to your Microsoft application">
    Go to [Azure Active Directory](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps) and select your Microsoft application.
  </Step>

  <Step title="Verify supported account types">
    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/9oHTRL6TP7mU0lre/images/multi-tenant-auth/authentication/oauth/microsoft-supported-account-types.webp?fit=max&auto=format&n=9oHTRL6TP7mU0lre&q=85&s=998adf9dc1c06e5bbc9a16fa3e75f5e2" alt="Supported Account Types" width="1016" height="538" data-path="images/multi-tenant-auth/authentication/oauth/microsoft-supported-account-types.webp" />

    <img src="https://mintcdn.com/stytch-34ca0595/ImrCo7c3M8ByeeMn/images/multi-tenant-auth/authentication/oauth/microsoft-sign-in-audience.webp?fit=max&auto=format&n=ImrCo7c3M8ByeeMn&q=85&s=44b5d86e0658a461142e54d723ba57cf" alt="Sign in audience" width="858" height="194" data-path="images/multi-tenant-auth/authentication/oauth/microsoft-sign-in-audience.webp" />
  </Step>

  <Step title="Add a redirect URI">
    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/ImrCo7c3M8ByeeMn/images/multi-tenant-auth/authentication/oauth/microsoft-add-a-platform.webp?fit=max&auto=format&n=ImrCo7c3M8ByeeMn&q=85&s=768193eb44b158adb4bda568caa1ee74" alt="Add a platform" width="1514" height="474" data-path="images/multi-tenant-auth/authentication/oauth/microsoft-add-a-platform.webp" />
  </Step>

  <Step title="Configure the Stytch redirect URI">
    Copy the Stytch redirect URI from the [Dashboard](https://stytch.com/dashboard/oauth) and paste it into the URI field.

    <img src="https://mintcdn.com/stytch-34ca0595/ImrCo7c3M8ByeeMn/images/multi-tenant-auth/authentication/oauth/microsoft-configure-web-redirect-uris.webp?fit=max&auto=format&n=ImrCo7c3M8ByeeMn&q=85&s=595bbd88bca9af113c96473f943e9eff" alt="Configure redirect URIs" width="584" height="386" data-path="images/multi-tenant-auth/authentication/oauth/microsoft-configure-web-redirect-uris.webp" />
  </Step>

  <Step title="Save the configuration">
    Click **Configure** to save the URI.
  </Step>
</Steps>
