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

# Azure AD SSO | OpenMetadata Authentication Guide

> Learn to configure Azure SSO for confidential clients with OIDC, secure token handling, and client secret setup for web and backend apps.

## Overview

Azure Active Directory (Azure AD) Single Sign-On (SSO) allows users to log in securely using their **Microsoft 365 / Entra ID** accounts via **OAuth 2.0** and **OpenID Connect (OIDC)**.

This guide covers both **Public** and **Confidential** client configurations. Use a confidential client for **web applications and backend services** that can securely store secrets, and a public client for single-page and mobile applications.

## Configure Azure AD SSO

Complete the following steps to configure Azure AD SSO.

1. Navigate to **Settings** > **SSO**.

   ![Settings, SSO page with the Choose Provider list](https://mintcdn.com/openmetadata/3PpSys_jqwwEnY4U/public/images/how-to-guides/admin-guide/choose-provider.png?fit=max\&auto=format\&n=3PpSys_jqwwEnY4U\&q=85\&s=7cb38e3c81e081ad29b7bdb3ecb7a0ec)

2. Click **Azure AD**, and then click **Configure**.

3. Enter the configuration details. For more information, see [Configuration Fields](#configuration-fields).

4. Click **Test Login** and complete the sign-in. For more information, see [Test Login](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/how-to-guides/admin-guide/sso.md#test-login).

5. Click **Save** to finish the SSO configuration.

## Configuration Fields

This section lists all fields in the order they appear in the OpenMetadata SSO configuration form.

### Authentication Configuration

Configure the identity provider connection and basic authentication behavior.

#### Provider Name

* **Definition**: A human-readable name for this Azure AD SSO configuration.
* **Example**: `Azure AD SSO`, `Company Azure AD`, `Microsoft Entra ID`
* **Why it matters**: Helps identify this SSO configuration in logs and user interfaces.

#### Client Type

* **Definition**: Defines whether the application is public (no client secret) or confidential (requires a client secret).
* **Options**: `Public` | `Confidential`
* **Example**: `Confidential`
* **Why it matters**: Determines the security level and OAuth flow.
* **Note**:
  * Use `Confidential` for backend services and web applications.
  * Use `Public` for single-page applications (SPAs) and mobile apps.
  * Azure AD typically uses `Confidential` client type.
  * You can't change **Client Type** after you save the configuration.

#### Enable Self Signup

* **Definition**: Allows users to automatically create OpenMetadata accounts on their first SSO login.
* **Options**: Enabled | Disabled
* **Example**: Enabled
* **Why it matters**: Controls whether new users join automatically or need manual provisioning.
* **Note**: Disable for stricter control over user access.

#### Authority

* **Definition**: Azure AD endpoint that issues tokens for your tenant.
* **Example**: `https://login.microsoftonline.com/your-tenant-id`
* **Why it matters**: Tells OpenMetadata which Azure AD tenant to authenticate against.
* **Note**:
  * Replace `your-tenant-id` with your actual Azure AD tenant ID.
  * Use `common` for multi-tenant applications.

### Public Client Configuration

When **Client Type** is set to **Public**, the form shows the following fields instead of **OIDC Configuration**.

#### Client ID

* **Definition**: The client ID of the Azure AD application that OpenMetadata uses to identify itself.
* **Why it matters**: A public client has no client secret, so the client ID is the only application credential.

#### Callback URL

* **Definition**: The redirect URL where Azure AD sends authentication responses after login.
* **Note**:
  * **This field is read-only**: OpenMetadata fills it in as `{your-domain}/callback`.
  * Copy this URL and register it as an authorized redirect URI in your Azure AD application.
  * Use HTTPS in production.

#### Authority

* **Definition**: The URL of the Azure AD authorization server.
* **Why it matters**: Specifies where OpenMetadata sends authentication requests.

#### Public Key URLs

* **Definition**: One or more URLs where Azure AD publishes its JSON Web Token (JWT) signing keys.
* **Why it matters**: OpenMetadata uses the keys to verify the signature of the tokens that Azure AD issues.

#### Token Validation Algorithm

* **Options**: `RS256` | `RS384` | `RS512`
* **Note**: The value must match the signing algorithm that Azure AD uses. Most providers use `RS256`.

### OIDC Configuration

Configure the OIDC client credentials and token handling. These fields appear when **Client Type** is set to **Confidential**.

#### OIDC Client ID

* **Definition**: The Application (client) ID for OIDC authentication with Azure AD.
* **Example**: `12345678-1234-1234-1234-123456789012`
* **Why it matters**: Identifies your application to Azure AD in OIDC flows.
* **Note**: Found in **Azure AD** > **App registrations** > **Your app** > **Overview** > **Application (client) ID**.

#### OIDC Client Secret

* **Definition**: Secret key for confidential client authentication.
* **Example**: `abc123def456ghi789jkl012mno345pqr678st`
* **Why it matters**: Required to securely authenticate with Azure AD.
* **Note**:
  * Generate in **Azure AD** > **App registrations** > **Certificates & secrets**.
  * Store securely and rotate periodically.

#### OIDC Request Scopes

* **Definition**: Permissions requested from Azure AD during authentication.
* **Default**: `openid email profile`
* **Example**: `openid email profile offline_access`
* **Why it matters**: Defines what user information OpenMetadata can access and whether Azure AD returns a refresh token.
* **Note**: For Azure authorization code flow with MCP OAuth, include `offline_access` so Azure AD can issue refresh tokens. Microsoft Entra ID returns refresh tokens only when the request includes the `offline_access` scope.

#### OIDC Discovery URI

* **Definition**: Azure AD's OpenID Connect metadata endpoint.
* **Example**: `https://login.microsoftonline.com/your-tenant-id/v2.0/.well-known/openid-configuration`
* **Why it matters**: Allows OpenMetadata to automatically discover Azure AD's OIDC endpoints.
* **Note**: Replace `your-tenant-id` with your actual Azure AD tenant ID.

#### OIDC Custom Parameters

* **Definition**: Additional parameters to include in OIDC authentication requests.
* **Example**: `{"prompt": "select_account", "domain_hint": "company.com"}`
* **Why it matters**: Allows customization of Azure AD authentication behavior.
* **Note**: Common parameters include `prompt`, `domain_hint`, `login_hint`.

#### OIDC Tenant

* **Definition**: Azure AD tenant identifier.
* **Example**: `your-tenant-id` or `company.onmicrosoft.com`
* **Why it matters**: Specifies which Azure AD tenant to authenticate against.
* **Note**: Use `common` for multi-tenant applications.

#### OIDC Callback URL

* **Definition**: URL where Azure AD redirects after authentication.
* **Example**: `https://yourapp.company.com/callback`
* **Why it matters**: Must be registered in your Azure AD app configuration.
* **Note**:
  * **This field is read-only**: it is auto-populated as `{your-domain}/callback`.
  * Copy this URL and add it to **Azure AD** > **App registrations** > **Authentication** > **Redirect URIs**.

#### OIDC Prompt

* **Definition**: Controls Azure AD's authentication prompt behavior.
* **Options**: `none`, `login`, `consent`, `select_account`
* **Default**: Empty. Leave it empty unless you need to force a specific behavior. OpenMetadata sends `none` itself when it re-authenticates a user silently.
* **Example**: `select_account`
* **Why it matters**: Defines how the login experience behaves for users.
* **Note**:
  * `login`: Always prompt for credentials.
  * `consent`: Prompt for permissions.
  * `select_account`: Show account picker.

#### Advanced Configuration

The following fields are grouped under **Advanced Config** in the UI (collapsed by default):

##### OIDC Use Nonce

* **Definition**: Prevents replay attacks in OIDC flows.
* **Default**: `false`
* **Why it matters**: Enhances security by ensuring each authentication request is unique.

##### OIDC Disable PKCE

* **Definition**: Disables Proof Key for Code Exchange.
* **Default**: `false`
* **Why it matters**: PKCE adds security to the authorization code flow.
* **Note**: Should remain `false` (enabled) in most cases.

##### OIDC Max Clock Skew

* **Definition**: Maximum allowed time difference in seconds between systems when validating tokens.
* **Example**: `0`
* **Why it matters**: Prevents token validation failures due to minor clock differences between servers.

##### OIDC Token Validity

* **Definition**: Duration in seconds that tokens remain valid.
* **Default**: `3600`
* **Example**: `3600`
* **Why it matters**: Balances token lifetime against security requirements.
* **Note**: The value must be positive. OpenMetadata rejects a zero or negative value, and falls back to `3600` at runtime if an invalid value is ever persisted.

##### OIDC Max Age

* **Definition**: The `max_age` request parameter, in seconds, that OpenMetadata sends to the identity provider.
* **Default**: Empty.
* **Why it matters**: Leave it empty so the identity provider can reuse its own session. A value of `0` is treated as not set. To force users to re-enter their credentials, set **OIDC Prompt** to `login`.

##### OIDC Session Expiry

* **Definition**: How long user sessions remain valid in seconds.
* **Default**: `604800` (7 days)
* **Example**: `604800`
* **Why it matters**: Controls session timeout for confidential clients.

##### End Session With Identity Provider

* **Definition**: Controls whether OpenMetadata ties a user session to the identity provider's session.
* **Default**: `false`
* **Note**:
  * Available for confidential OIDC clients only.
  * When on, OpenMetadata renews the identity provider's tokens on the provider's schedule while the user is active. It signs the user out when the provider rejects the refresh token. The token that OpenMetadata issues is shortened to that schedule, with a minimum of 120 seconds. A renewal never extends the session beyond **OIDC Session Expiry**.
  * When off, a session lasts for the configured **OIDC Session Expiry**.
  * The sign-out depends on the provider. Keycloak revokes refresh tokens together with the provider session, and Microsoft Entra ID doesn't.

### JWT Claims

Map identity token claims to OpenMetadata user identities and team assignments.

#### JWT Principal Claims

* **Definition**: JWT fields used to identify users in OpenMetadata. The first claim that returns a value is used.
* **Default**: `["preferred_username", "email", "upn", "sub"]`
* **Example**: `["preferred_username", "email", "sub"]`
* **Why it matters**: Determines how users are matched to their OpenMetadata accounts.
* **Note**:
  * At least one claim in this list must correspond to the user's email address. OpenMetadata uses this to identify and match authenticated users to their OpenMetadata accounts.
  * Common Azure AD claims: `email`, `preferred_username`, `upn`, `sub`.
  * Order matters: the first matching claim is used.

> [!WARNING]
>
> **Important**: Incorrect claims will lock out all users including admins. The default values (`preferred_username`, `email`, `upn`, `sub`) work for most Azure AD configurations. Only change if you have custom claim requirements.

#### JWT Principal Claims Mapping

**Definition**: Maps JSON Web Token (JWT) claims to OpenMetadata user profile fields.

**Supported keys**: Only `email` and `username` are valid mapping targets in `jwtPrincipalClaimsMapping`.

**Example**:

```yaml theme={null}
["email:email", "username:preferred_username"]
```

**Why it matters**: Controls how SSO login data maps to user profiles in OpenMetadata.

**Format**: `openmetadata_field:jwt_claim` (for example, `"email:email"`).

> [!NOTE]
>
> **Note**: The display name is derived automatically from standard OIDC/JWT claims, so you don't need to configure it using `jwtPrincipalClaimsMapping`. If you need richer name handling, make sure Azure's app registration includes `given_name` and `family_name` as optional claims in the ID token.

> [!WARNING]
>
> **Important**: Using any other key (for example, `name` or `firstName`) will cause the service to fail on startup with a validation error. JWT Principal Claims Mapping is rarely needed. The default JWT Principal Claims handle user identification correctly for most Azure AD configurations.

#### JWT Team Claim Mapping

* **Definition**: Azure AD claim containing team or department information for automatic team assignment in OpenMetadata.
* **Example**: `department`, `jobTitle`, `groups`
* **Why it matters**: Automatically assigns users to existing OpenMetadata teams based on their Azure AD attributes at login.
* **Note**:
  * Common Azure AD attributes: `department`, `jobTitle`, `companyName`, `officeLocation`.
  * To use the `groups` claim, configure group membership claims in **Azure AD** > **App registrations** > **Token configuration**.
  * The team must already exist in OpenMetadata for assignment to work.
  * Only teams of type **Group** can be auto-assigned. Team names are case-sensitive.

### Authorizer Configuration

Control which users and domains are permitted to access OpenMetadata.

#### Admin Principals

* **Definition**: Users granted admin access in OpenMetadata.
* **Example**: `["admin", "superuser"]`
* **Why it matters**: Grants full admin privileges in OpenMetadata.
* **Note**: Enter usernames only, not email addresses. Use the part of the email before `@` (for example, for `admin@company.com`, enter `admin`). The value must match what Azure AD returns for the claim configured in **JWT Principal Claims**.

#### Principal Domain

* **Definition**: Default domain for user principals.
* **Example**: `company.com`
* **Why it matters**: Used to construct full user identifiers when only a username is provided.

#### Enforce Principal Domain

* **Definition**: Restricts login to users belonging to the configured Principal Domain.
* **Default**: `false`
* **Example**: `true`
* **Why it matters**: Adds an extra layer of security by limiting access to a specific domain.

#### Enable Secure Socket Connection

* **Definition**: Enables Secure Sockets Layer/Transport Layer Security (SSL/TLS) for all SSO communication.
* **Default**: `false`
* **Example**: `true`
* **Why it matters**: Ensures encrypted communication between OpenMetadata and Azure AD.
* **Note**: Recommended in production environments.

#### Allowed Domains

* **Definition**: List of email domains permitted to authenticate with OpenMetadata.
* **Example**: `["company.com", "subsidiary.com"]`
* **Why it matters**: Provides fine-grained control over which email domains can log in via Azure AD.
* **Note**:
  * Works in conjunction with **Enforce Principal Domain**.
  * Useful for multi-tenant scenarios or when allowing specific external domains.
  * Leave empty if you only use a single domain configured in **Principal Domain**.

#### Use Roles From Provider

* **Definition**: Use roles returned by Azure AD in the token to assign OpenMetadata roles.
* **Default**: `false`
* **Why it matters**: Enables role-based access control driven by your Azure AD role assignments.
* **Note**: Roles must be included in the Azure AD token and must match existing OpenMetadata role names.
  * Roles sync on every login. A role change in Azure AD takes effect the next time the user signs in.
  * If the token omits the roles claim entirely, OpenMetadata treats it as no roles. Some providers leave the claim out once a user's last role is removed.
  * A fresh sign-in then removes the roles and administrator access that the provider no longer grants.
  * Roles from the provider can promote a user to Admin. A sign-in never demotes an admin assigned through **Admin Principals**.

#### Default OAuth Role

* **Definition**: Default role assigned to new users when they first sign in via SSO self-signup.
* **Example**: `DataConsumer`
* **Why it matters**: Controls the starting permission level for new users who join through self-signup.
* **Note**: Leave empty to create users without any role. Requires **Enable Self Signup** to be active. The role must already exist in OpenMetadata.

### Summary

Quick reference of all configuration fields and their example values.

| Field | Example / Default |
| - | - |
| Provider Name | Azure AD SSO |
| Client Type | Confidential |
| Enable Self Signup | Enabled |
| Authority | `https://login.microsoftonline.com/your-tenant-id` |
| OIDC Client ID | 12345678-1234-1234-1234-123456789012 |
| OIDC Client Secret | abc123def456... |
| OIDC Request Scopes | openid email profile offline\_access |
| OIDC Discovery URI | `https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration` |
| OIDC Custom Parameters | `{"prompt": "select_account"}` |
| OIDC Tenant | your-tenant-id |
| OIDC Callback URL | `https://yourapp.company.com/callback` (read-only) |
| OIDC Prompt | select\_account |
| OIDC Use Nonce | false |
| OIDC Disable PKCE | false |
| OIDC Max Clock Skew | 0 |
| OIDC Token Validity | 3600 |
| OIDC Max Age | Leave empty |
| OIDC Session Expiry | 604800 |
| JWT Principal Claims | `["preferred_username", "email", "upn", "sub"]` |
| JWT Principal Claims Mapping | `["email:email", "username:preferred_username"]` |
| JWT Team Claim Mapping | department |
| Admin Principals | `["admin", "superuser"]` |
| Principal Domain | company.com |
| Enforce Principal Domain | false |
| Enable Secure Socket Connection | true |
| Allowed Domains | `["company.com"]` |
| Use Roles From Provider | false |
| Default OAuth Role | DataConsumer |

## Troubleshooting

### Troubleshooting

If users are automatically logged out and unable to log in again due to a bad authentication configuration, you can reset the security setup using the following command:

```

./bootstrap/openmetadata-ops.sh remove-security-config --force

```

After executing the command, **restart the server**. The authentication values from your YAML or Helm chart will then be reapplied on startup. The following tiles detail how to apply this configuration across Docker, Kubernetes, and Bare Metal deployments:

> **[Docker Security](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/deployment/docker/security.md)**
>
> Configure SSO for your Docker deployment.

> **[Bare Metal Security](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/deployment/bare-metal/security.md)**
>
> Configure SSO for your bare metal deployment.

> **[Kubernetes Security](https://docs.open-metadata.org/v2.1.x-SNAPSHOT/deployment/kubernetes/security.md)**
>
> Configure SSO for your Kubernetes deployment.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.