---
title: Integrate with ChatGPT
sidebar_label: ChatGPT
support_level: community
---

import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";

## What is ChatGPT

> ChatGPT is OpenAI's conversational AI platform that provides chat-based assistance across the web and desktop applications.
>
> -- https://chatgpt.com

## Preparation

The following placeholders are used in this guide:

- `authentik.company` is the FQDN of the authentik installation.

:::info
This documentation lists only the settings that you need to change from their default values. Be aware that any changes other than those explicitly mentioned in this guide could cause issues accessing your application.
:::

## Configuration methods

You can configure ChatGPT to use either OIDC or SAML; this guide explains both options.

<Tabs
  defaultValue="oidc"
  values={[
    { label: "OIDC", value: "oidc" },
    { label: "SAML", value: "saml" },
  ]}>
  <TabItem value="oidc">

## authentik configuration

To support the integration of ChatGPT with authentik, you need to create an application/provider pair in authentik.

### Create an application and provider in authentik

1. Log in to authentik as an administrator and open the authentik Admin interface.
2. Navigate to **Applications** > **Applications** and click **Create with Provider** to create an application and provider pair. (Alternatively you can first create a provider separately, then create the application and connect it with the provider.)
    - **Application**: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings. Take note of the **Slug** value because it will be required later.
    - **Choose a Provider type**: select **OAuth2/OpenID Connect** as the provider type.
    - **Configure the Provider**: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations.
        - Note the **Client ID** and **Client Secret** values because they will be required later.
        - Temporarily set a `Strict` redirect URI to `https://temp.temp`.
        - Select any available signing key.
    - **Configure Bindings** _(optional)_: you can create a [binding](/docs/add-secure-apps/bindings-overview/) (policy, group, or user) to manage the listing and access to applications on a user's **My applications** page.

3. Click **Submit** to save the new application and provider.

## ChatGPT configuration

:::info Domain verification required
ChatGPT only enables the **Manage SSO** wizard after you verify ownership of your domain in the ChatGPT admin console. Refer to the [OpenAI Domain Verification documentation](https://help.openai.com/en/articles/8871611-domain-verification) for more details.
:::

1. Log in to ChatGPT as an administrator and navigate to the [Identity & Access page](https://chatgpt.com/admin/identity).
2. Under **Identity Management**, click **Manage SSO**, then select **Custom OIDC** as the single sign-on method.
3. Complete the Custom OIDC wizard:
    - **Provide an Identity Provider Name**: enter a descriptive name (e.g. `authentik`).
    - **Create an Application**: copy the **Login redirect URI** that ChatGPT displays.
    - **Add Claims**: confirm ChatGPT lists the required claims (`sub`, `email`, `given_name`, and `family_name`). These are provided by authentik's default OIDC property mappings when the `email` and `profile` scopes are enabled.
    - **Provide your OIDC Configuration**:
        - **Client ID**: enter the client ID from authentik.
        - **Client Secret**: enter the client secret from authentik.
        - **Discovery endpoint**: `https://authentik.company/application/o/<application_slug>/.well-known/openid-configuration`
    - **Configure Application Link**: review the direct sign-in link that ChatGPT generates; share it with users if needed.
    - **Test Single Sign-On**: run the built-in test. ChatGPT should redirect you to authentik for authentication and report success.

## Reconfigure authentik provider

1. Log in to authentik as an administrator and open the authentik Admin interface.
2. Navigate to **Applications** > **Providers** and click the **Edit** icon of the newly created ChatGPT provider.
3. Under **Protocol settings**, set the **Redirect URIs** to the **Login redirect URI** from ChatGPT.
4. Click **Update**.

</TabItem>

  <TabItem value="saml">

## authentik configuration

To support the integration of ChatGPT with authentik, you need to create an application/provider pair in authentik.

### Create an application and provider in authentik

1. Log in to authentik as an administrator and open the authentik Admin interface.
2. Navigate to **Applications** > **Applications** and click **Create with Provider** to create an application and provider pair. (Alternatively you can first create a provider separately, then create the application and connect it with the provider.)
    - **Application**: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings. Take note of the **slug** as it will be required later.
    - **Choose a Provider type**: select **SAML Provider** as the provider type.
    - **Configure the Provider**: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations.
        - Temporarily set the **ACS URL** to `https://temp.temp` (you will update this after completing the ChatGPT configuration).
        - Under **Advanced protocol settings**, set **Signing Certificate** to use any available certificate.
    - **Configure Bindings** _(optional)_: you can create a [binding](/docs/add-secure-apps/bindings-overview/) (policy, group, or user) to manage the listing and access to applications on a user's **My applications** page.

3. Click **Submit** to save the new application and provider.

### Download certificate file

1. Log in to authentik as an administrator and open the authentik Admin interface.
2. Navigate to **Applications** > **Providers** and click on the name of the provider that you created in the previous section.
3. Under **Related objects** > **Download signing certificate**, click on **Download**. This downloaded file is your certificate file and it will be required in the next section.

## ChatGPT configuration

:::info Domain verification required
ChatGPT only enables the **Manage SSO** wizard after you verify ownership of your domain in the ChatGPT admin console. Refer to the [OpenAI Domain Verification documentation](https://help.openai.com/en/articles/8871611-domain-verification) for more details.
:::

1. Log in to ChatGPT as an administrator and navigate to the [Identity & Access page](https://chatgpt.com/admin/identity).
2. Under **Identity Management**, click **Manage SSO**, then select **Custom SAML** as the single sign-on method.
3. Complete the Custom SAML wizard:
    - **Provide an Identity Provider Name**: enter a descriptive name (e.g. `authentik`).
    - **Provide your SAML Configuration**:
        - **Entity ID**: `authentik`
        - **Sign-in URL**: `https://authentik.company/application/saml/<application_slug>/sso/binding/redirect/`
        - **Sign-out URL**: `https://authentik.company/application/saml/<application_slug>/slo/binding/redirect/`
        - **X.509 Certificate**: paste the contents of your certificate file.
    - **Create an Application**: copy the **ACS URL** and **Audience** values that ChatGPT displays.
    - **Configure Application Link**: review the direct sign-in link that ChatGPT generates; share it with users if needed.
    - **Test Single Sign-On**: run the built-in test. ChatGPT should redirect you to authentik for authentication and report success.

## Reconfigure authentik provider

1. Log in to authentik as an administrator and open the authentik Admin interface.
2. Navigate to **Applications** > **Providers** and click the **Edit** icon of the newly created ChatGPT provider.
3. Under **Protocol settings**, set the following required configurations:
    - **ACS URL**: set to the **ACS URL** from ChatGPT.
    - **Audience**: set to the **Audience** from ChatGPT.
4. Click **Update**.

</TabItem>
</Tabs>

## Configuration verification

To verify that authentik is correctly integrated with ChatGPT, log out, then attempt to log back in by entering your email address and clicking **Continue**. You should be redirected to authentik and upon a successful login, redirected back to ChatGPT.

## Resources

- [OpenAI Help - Configuring SSO for ChatGPT](https://help.openai.com/en/articles/9534785-configuring-sso-for-chatgpt)
- [OpenAI Help - SSO for ChatGPT Business - FAQ](https://help.openai.com/en/articles/11489188-sso-for-chatgpt-business-faq)
- [OpenAI Help - SSO Overview](https://help.openai.com/en/articles/10468051-sso-overview)
- [OpenAI Help - Domain Verification](https://help.openai.com/en/articles/8871611-domain-verification)
