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

> [!NOTE]
>
> The Stytch B2B Microsoft OAuth product limits access to only **verified Azure Active Directory accounts**. Personal accounts, including personal Xbox Live, Skype, or Outlook accounts, are not allowed. Accounts managed by Azure Active Directory B2C are not allowed.
>
> By default, Stytch will deduplicate users by treating their `UserPrincipalName` as an email address.

## Create a new Microsoft OAuth client

**1. Create a Microsoft Azure account**

If you don't have one already, create a [Microsoft Azure account](https://login.microsoftonline.com/).

**2. 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.

**3. Create a new registration**

Click **New registration**.

![New Microsoft Registration](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)

**4. Enter application details**

Enter a name for your OAuth client.

**5. Select account type**

Select **Accounts in any organizational directory (Any Azure AD directory - Multitenant)**.

![Select Account Type](https://mintcdn.com/stytch-34ca0595/SPTdrUFUcqmauQAu/images/multi-tenant-auth/authentication/oauth/microsoft-select-account-type.png?fit=max\&auto=format\&n=SPTdrUFUcqmauQAu\&q=85\&s=1b0741772642500f2575f6ce630f66a7)

**6. 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.

![Redirect URI](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)

**7. Register the application**

Click **Register** to save the configuration.

## Configure your Microsoft OAuth client in Stytch

**1. 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.

**2. 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**.

![Add a platform](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)

**3. 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.

![Configure redirect URIs](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)

**4. Save the configuration**

Click **Configure** to save the URI.
