Integrate with ChatGPT
Support level: Community
What is ChatGPT?
ChatGPT is OpenAI's conversational AI platform that provides chat-based assistance across the web and desktop applications.
Preparation
The following placeholders are used in this guide:
authentik.companyis the FQDN of the authentik installation.
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.
ChatGPT supports SSO with either OIDC or SAML. Choose one protocol and follow the matching tab throughout this guide.
authentik configuration
To support the integration of ChatGPT with authentik, you need to create an application/provider pair in authentik.
- OIDC
- SAML
In authentik versions earlier than 2026.5, all Redirect URIs are automatically treated as Authorization type. If you are using one of these older authentik versions, add only the Authorization URL to your Redirect URIs and do not configure a Post Logout URI.
Create an OIDC property mapping
ChatGPT expects a family_name claim in the OIDC profile data. Create a dedicated profile scope mapping so authentik sends the claim together with the standard profile values.
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to Customization > Property Mappings and click New Property Mapping.
- Select Scope Mapping and set the following values:
- Mapping Name: enter a descriptive name, such as
ChatGPT OIDC profile. - Scope name:
profile - Expression:
- Mapping Name: enter a descriptive name, such as
name = request.user.name or request.user.username
name_parts = name.split(" ", 1)
given_name = request.user.attributes.get("given_name", name_parts[0])
family_name = request.user.attributes.get(
"family_name",
name_parts[1] if len(name_parts) > 1 else "",
)
return {
"name": name,
"given_name": given_name,
"family_name": family_name,
"preferred_username": request.user.username,
}
- Click Finish to save the property mapping.
Create an OIDC application and provider
-
Log in to authentik as an administrator and open the authentik Admin interface.
-
Navigate to Applications > Applications and click New Application to open the application wizard.
- 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 add a Redirect URI of type
StrictAuthorizationashttps://temp.temp. - Select any available Signing Key.
- Under Advanced protocol settings, in Scopes, replace
authentik default OAuth Mapping: OpenID 'profile'with the ChatGPT profile scope mapping that you created.
- Configure Bindings (optional): you can create a binding (policy, group, or user) to manage the listing and access to applications on a user's Application Dashboard page.
-
Click Submit to save the new application and provider.
authentik 2026.5 introduces changes to how the SAML provider behaves. Specifically, the provider now automatically sets the Issuer value to: https://authentik.company/application/saml/<application_slug>/metadata/
Older versions of authentik set this value to authentik by default. If you're running an older version, please set Issuer to https://authentik.company/application/saml/<application_slug>/metadata/, where <application_slug> is the slug that you selected for the application.
Create a SAML application and provider
-
Log in to authentik as an administrator and open the authentik Admin interface.
-
Navigate to Applications > Applications and click New Application to open the application wizard.
- 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 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. - Under Advanced protocol settings, set Signing Certificate to use any available certificate.
- Temporarily set the ACS URL to
- Configure Bindings (optional): you can create a binding (policy, group, or user) to manage the listing and access to applications on a user's Application Dashboard page.
-
Click Submit to save the new application and provider.
Download the SAML signing certificate
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to Applications > Providers and click on the name of the provider that you created in the previous section.
- Under Related objects > Download signing certificate, click Download. This downloaded file is required in the next section.
ChatGPT configuration
ChatGPT only enables SSO setup after you verify ownership of your domain. Domain verification and domain mapping are outside the scope of this guide. Refer to the OpenAI SSO configuration documentation for more details.
- OIDC
- SAML
Configure ChatGPT with OIDC
- Log in to the OpenAI Identity page as a Global Admin.
- In the Single Sign-On section, click Set up SSO, then select Custom OIDC as the identity provider.
- Complete the Custom OIDC wizard:
- Identity Provider Name: enter a descriptive name, such as
authentik. - Create an Application: copy the Login redirect URI that ChatGPT displays.
- Add Claims: confirm ChatGPT lists the required claims. The authentik provider created in the previous section sends
sub,email,given_name, andfamily_name. - 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
- 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.
- Identity Provider Name: enter a descriptive name, such as
Update the OIDC provider in authentik
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to Applications > Providers and click the Edit icon of the newly created ChatGPT provider.
- Under Protocol settings, add a Redirect URI of type
StrictAuthorizationas the Login redirect URI value from ChatGPT. - Click Update.
Configure ChatGPT with SAML
- Log in to the OpenAI Identity page as a Global Admin.
- In the Single Sign-On section, click Set up SSO, then select Custom SAML as the identity provider.
- Complete the Custom SAML wizard:
- Identity Provider Name: enter a descriptive name, such as
authentik. - Create a SAML Application: copy the Single sign-on URL and Audience URI values that ChatGPT displays.
- Attribute Mapping: confirm that ChatGPT lists an email address attribute. The default authentik SAML mappings include
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress. - IdP Metadata: select the manual configuration option and enter the following values:
- Entity ID:
https://authentik.company/application/saml/<application_slug>/metadata/ - Sign-in URL:
https://authentik.company/application/saml/<application_slug>/ - X.509 Certificate: paste the contents of your certificate file.
- Entity ID:
- 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.
- Identity Provider Name: enter a descriptive name, such as
Update the SAML provider in authentik
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to Applications > Providers and click the Edit icon of the newly created ChatGPT provider.
- Under Protocol settings, set the following required configurations:
- ACS URL: set to the Single sign-on URL from ChatGPT.
- Audience: set to the Audience URI from ChatGPT.
- Click Update.
Configuration verification
To verify that authentik is correctly integrated with ChatGPT, open ChatGPT, enter your email address, and click Continue. You should be redirected to authentik and, after a successful login, redirected back to ChatGPT.