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

# Use Active Directory as Single Sign-On provider

Chainloop authentication backend is delegated to an OpenID Connect (OIDC) compatible Identity Provider (IdP) such as Google, GitHub, Auth0 or Azure Active Directory.

This guide will show you how to configure your Chainloop instance to run authentication over Azure Active Directory.

The process comprises two steps:

1. Register a new App in your Azure Active Directory tenant
2. Configure Chainloop deployment with the new OIDC settings

## Register a new App

In your Azure console go to **App registrations** and click on **New registration**.

<img src="https://mintcdn.com/chainloop/4m_Z_ZeRnSV7jb7V/guides/deployment/guides/img/register-app.png?fit=max&auto=format&n=4m_Z_ZeRnSV7jb7V&q=85&s=21011a7bc979796c27f52af55854be3b" alt="Register a new App" width="1822" height="1121" data-path="guides/deployment/guides/img/register-app.png" />

Fill out a descriptive name and your custom callback URL that should point to your instance of Chainloop control plane.

<img src="https://mintcdn.com/chainloop/4m_Z_ZeRnSV7jb7V/guides/deployment/guides/img/register-app-2.png?fit=max&auto=format&n=4m_Z_ZeRnSV7jb7V&q=85&s=976e0ae4b3b4eb3e880cba2128bd7956" alt="Register a new App" width="1740" height="1214" data-path="guides/deployment/guides/img/register-app-2.png" />

Once done, take note of the generated **Application (client) ID** and the tenant ID.

<img src="https://mintcdn.com/chainloop/4m_Z_ZeRnSV7jb7V/guides/deployment/guides/img/register-app-0.png?fit=max&auto=format&n=4m_Z_ZeRnSV7jb7V&q=85&s=b5212a5c0005d2ce0a2a85eafbfacce7" alt="Register a new App" width="1511" height="562" data-path="guides/deployment/guides/img/register-app-0.png" />

## Create a new client secret

Next Create a new client secret and copy the generated value by clicking on "Certificate & secrets" > "New client secret"

<img src="https://mintcdn.com/chainloop/4m_Z_ZeRnSV7jb7V/guides/deployment/guides/img/register-app-3.png?fit=max&auto=format&n=4m_Z_ZeRnSV7jb7V&q=85&s=9db5b26002f6884abb79d0438d686499" alt="Register a new App" width="2148" height="964" data-path="guides/deployment/guides/img/register-app-3.png" />

Once done, copy the "value" which will be used as the `clientSecret` in the next step.

<img src="https://mintcdn.com/chainloop/4m_Z_ZeRnSV7jb7V/guides/deployment/guides/img/register-app-4.png?fit=max&auto=format&n=4m_Z_ZeRnSV7jb7V&q=85&s=f5e5fbf49a80901646210217e3ca57c2" alt="Register a new App" width="1177" height="514" data-path="guides/deployment/guides/img/register-app-4.png" />

## Setup ODIC claims

Finally, we need to configure the OIDC claims that Chainloop will use to show information about the user. Specifically, we need to set the `given_name` and `family_name` claims.
This option can be found in the **Token configuration** section of your app registration.

<img src="https://mintcdn.com/chainloop/4m_Z_ZeRnSV7jb7V/guides/deployment/guides/img/azure-ad-optional-claims.png?fit=max&auto=format&n=4m_Z_ZeRnSV7jb7V&q=85&s=b5df6665b671526e958046a1d29ba927" alt="Choose ODIC Claims" width="2368" height="1976" data-path="guides/deployment/guides/img/azure-ad-optional-claims.png" />

## (Optional) Enable automatic provisioning of user roles and groups

Enable automatic provisioning of user roles and groups by following the [Automatic provisioning of user roles and groups](/guides/deployment/guides/provisioning#dynamic-provisioning-through-single-sign-on-oidc) guide.

## Configure Chainloop deployment

As explained in the [deployment guide](../oss), Open ID Connect configuration is done using the `auth.oidc` section of the `values.yaml` file.

Use the ClientID, Secret and URL from the previous step to configure the OIDC backend as shown below

```yaml theme={"dark"}
auth:
  oidc:
    url: https://login.microsoftonline.com/[TENANT_ID]/v2.0
    clientID: [APP-CLIENT-ID]
    clientSecret: "[APP-CLIENT-SECRET]"
```

And deploy your Chainloop Control Plane with the update values to take effect.

Finally give it a try by running `chainloop auth login` and that's all! Your Chainloop users are now authenticated against your Active Directory tenant.
