---
title: "How to get your Microsoft Azure AD OAuth 2 credentials"
img: https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_microsoft_azure_ad_oauth_2_credentials-icon.png
date: 2024-06-03T00:00:00.000Z
tag: Guides
description: "This guide will show you how to obtain your OAuth 2 credentials for Microsoft Azure Active Directory (Azure AD), which are also needed for other integrations..."
url: "https://docs.unified.to/guides/how_to_get_your_microsoft_azure_ad_oauth_2_credentials"
---

# How to get your Microsoft Azure AD OAuth 2 credentials
------
_June 3, 2024_

This guide will show you how to obtain your OAuth 2 credentials for Microsoft Azure Active Directory (Azure AD), which are also needed for other integrations in the Microsoft Azure ecosystem e.g. Outlook, Teams, and Dynamics.


## Register an app in Microsoft Azure Portal

1. Navigate to [Microsoft Azure Portal](https://portal.azure.com/)
2. Search for **Azure Active Directory** and select it.

    ![oidc-microsoft-1.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_microsoft_azure_ad_oauth_2_credentials-0.png)

3. From the sidebar, under Manage, click **App registrations** and then **New registration.**

    ![oidc-microsoft-2.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_microsoft_azure_ad_oauth_2_credentials-1.png)

4. Fill in the following form to register a new app:
    1. Enter any name you'd like for your app.
    2. Select **Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)** to allow anyone to log in.
    3. Under **Redirect URI**, enter [`https://api.unified.to/oauth/code`](https://api.unified.to/oauth/code)
    4. Click **Register**.

    ![oidc-microsoft-3.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_microsoft_azure_ad_oauth_2_credentials-2.png)


## Get your client ID and client secret

1. After registering your app and on the resulting page, copy the **Client ID** (found next to **Application (client) ID**)
2. Click on **Add a certificate or secret** (found next to **Client credentials)**

    ![oidc-microsoft-4.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_microsoft_azure_ad_oauth_2_credentials-3.png)

3. Under **Client secrets (0)**, click **New client secret**.

    ![oidc-microsoft-5.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_microsoft_azure_ad_oauth_2_credentials-4.png)

4. Click **Add** - do not change anything else in the dialog.

    ![oidc-microsoft-6.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_microsoft_azure_ad_oauth_2_credentials-5.png)

5. On the next page, copy the **Value**

    ![oidc-microsoft-7.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_microsoft_azure_ad_oauth_2_credentials-6.png)


## Enter your OAuth credentials on Unified.to

1. Take note of your Microsoft client ID and client secret from the above steps
2. Navigate to the [app.unified.to](https://app.unified.to/) and find the integration page for the Microsoft integration you are interested in e.g. [https://app.unified.to/integrations/microsoft_ad](https://app.unified.to/integrations/microsoft_ad)
3. Enter your client ID
4. Enter your client secret

    ![Untitled.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_microsoft_azure_ad_oauth_2_credentials-7.png)

5. Make sure that you enable the correct permission scopes for your application.

    ![Untitled.png](https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_get_your_microsoft_azure_ad_oauth_2_credentials-8.png)


## Troubleshooting


**I'm getting an 'invalid client secret' error**


This error indicates a problem with the client ID and/or secret that you generated. Please ensure you copied the correct values to the integration settings page on Unified.to, or regenerate these credentials in Microsoft Azure Active Directory and then try again.