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

# Microsoft/Azure AD

> Configure how users authenticate and access the application through Microsoft/Azure AD

## Microsoft Authentication

Allow users to sign in with their Microsoft accounts using OAuth 2.0.

### How It Works

1. User clicks "Sign in with Microsoft"
2. User is redirected to Microsoft's authentication page
3. After authenticating with Microsoft, user is returned to the application
4. The system validates the authentication token from Microsoft
5. Upon successful validation, access is granted

### Configuration

To enable Microsoft authentication:

1. Register your application in the [Microsoft Azure Portal](https://portal.azure.com/):

   * Sign in to the Azure portal
   * Navigate to **Azure Active Directory** → **App registrations**
   * Click **New registration**
   * Enter a name for your application (e.g., "PipesHub login")
   * Select the appropriate **Supported account types** based on your needs:
     * **Single tenant**: Accounts in this organizational directory only
     * **Multitenant**: Accounts in any organizational directory
   * Under **Redirect URI**, select **Single-page application (SPA)** and enter your callback URL (e.g., `https://your-app-url/auth/microsoft/callback`)
   * Click **Register**

   <div style={{ textAlign: "center" }}>
     <img src="https://mintcdn.com/pipeshub/FZlFOkWh3i0y73mV/images/auth/microsoft/entra_app.png?fit=max&auto=format&n=FZlFOkWh3i0y73mV&q=85&s=295e3c5209967ece765638c0e0b7b5f4" alt="Azure AD App Registration" width="90%" data-path="images/auth/microsoft/entra_app.png" />
   </div>

   <Warning>
     The Redirect URI in your Azure App Registration must match exactly with your application's callback URL (`your-app-url/auth/microsoft/callback`)

     <Info>
       For example - if your app is running on `https://play.pipeshub.com`, then the Redirect URI should be `https://play.pipeshub.com/auth/microsoft/callback` in Azure Portal.
     </Info>
   </Warning>

2. After registration, note down the following from the **Overview** page:
   * **Application (Client) ID**
   * **Directory (Tenant) ID**

3. In PipesHub:

   * Navigate to **Authentication Settings**
   * Toggle on **Microsoft**
   * Enter the **Application (Client) ID** from your Azure app registration
   * Enter the **Directory (Tenant) ID** from your Azure app registration
   * Click **Save**

   <div style={{ textAlign: "center" }}>
     <img src="https://mintcdn.com/pipeshub/rV6WRyc2DiGnC8ma/images/auth/microsoft/pipeshub_microsoft_setup.png?fit=max&auto=format&n=rV6WRyc2DiGnC8ma&q=85&s=8380271e5a9344a8a0c86931da2e9893" alt="PipesHub Microsoft Configuration Dialog" width="90%" data-path="images/auth/microsoft/pipeshub_microsoft_setup.png" />
   </div>

<Info>
  Microsoft authentication works well for organizations using Microsoft 365 or with an existing Microsoft identity infrastructure.
</Info>
