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

# OpenID Connect (OIDC) SSO

> Set up a company login via OpenID Connect yourself in Admin 3.0. anny reads the endpoints from the discovery document.

anny supports company logins via OpenID Connect (OIDC). Any identity provider that offers OpenID Connect Discovery works, for example Entra ID, Okta, Keycloak, Auth0, or Authentik.

You provide the address of your identity provider and the credentials of the application. anny reads all other endpoints automatically, even if your identity provider changes them later.

> [!NOTE]
>
> If your identity provider supports SAML 2.0, we recommend that path, as more features such as SCIM and federated logins are available. You find a guide under [Generic SAML 2.0 SSO](https://docs.anny.co/en/generic-saml-sso.md).

## Setup in Admin 3.0

In Admin 3.0 you create the connection yourself, under **Account > Settings > SSO & Security**. Besides anny admin rights you need administrative access to your identity provider.

> [!NOTE]
>
> Admin v2.0 does not have the **OpenID Connect** card. Write to us at [support@anny.co](mailto:support@anny.co) and we create the connection for you.

First create a confidential application in your identity provider, sometimes also called "client" or "app". You need the issuer URL, the client ID, and the client secret.

**1. Choose OpenID Connect**

Open the [SSO settings](https://app.anny.co/organization/settings/sso?o=). If an identity provider is already connected, click **Add IDP** first. Choose the **OpenID Connect** card.

**2. Enter the credentials**

Enter **Issuer URL**, **Client ID**, **Client Secret**, and **Scopes**. `openid profile email` is the usual value. Click **Connect**.

**3. Store the URLs at your identity provider**

After connecting, anny shows the **Redirect / Callback URL**. Copy it and add it as an allowed redirect URL. If a **Post-logout URL** is shown next to it, add that too when users should also be signed out of the identity provider when they log out.

**4. Activate and test**

Then activate the provider and test the login via **Test Login & Connect User**.

> [!WARNING]
>
> As long as the callback URL is not stored in your identity provider, the login fails with an error such as "redirect\_uri mismatch".

## Required fields

| Field in anny | Description |
| - | - |
| **Issuer URL** | The base address of your identity provider, for example `https://login.example.com`. anny reads the endpoints from the discovery document at that address. |
| **Client ID** | The identifier of the application. |
| **Client secret** | The matching secret. anny stores it encrypted. |
| **Scopes** | The requested permissions. `openid profile email` is the usual value. |

## Advanced options

You only need the advanced options when your identity provider differs from the standard.

| Field in anny | Description |
| - | - |
| **Discovery URL** | Only needed when the discovery document is not at the issuer URL with `/.well-known/openid-configuration`. |
| **Require verified email address** | On by default. anny rejects sign-ins whose email address the provider reports as unverified. Providers that do not send `email_verified` are unaffected. |
| **Use PKCE** | On by default. Turns on Proof Key for Code Exchange when the provider requires it. |
| **User ID attribute** | Default `sub`. |
| **Email attribute** | Default `email`. |
| **First name attribute** | Default `given_name`. |
| **Last name attribute** | Default `family_name`. |

## Requirements for your identity provider

anny requests the scopes `openid profile email` and expects these claims:

| Claim | Purpose |
| - | - |
| `sub` | Permanent identifier of the person. The value has to stay stable, even when the name or email address changes. |
| `email` | Used to match the person to their anny account. |
| `given_name` and `family_name` | First and last name. If your identity provider only sends `name`, that is enough as well. |
| `email_verified` | Optional. When **Require verified email address** is on and the provider reports `false` here, anny rejects the login. If the claim is missing, sign-in still works. |

## Related articles

> [card] [SSO overview](https://docs.anny.co/en/sso-overview.md)
>
> Which login methods anny supports and when each one fits.

> [card] [Attribute mapping](https://docs.anny.co/en/attribute-mapping.md)
>
> Automatically assign users to communities based on what your identity provider sends.


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