Skip to content

Okta Configuration


This page will largely be a copy/paste of the Cloudflare Zero Trust documentation for Okta integration. Because I've integrated Okta into my setup, it's nice to have these instructions handy should I need them.


Okta provides cloud software that helps companies manage and secure user authentication to modern applications, and helps developers build identity controls into applications, website web services, and devices. You can integrate Okta with Cloudflare Zero Trust and build rules based on user identity and group membership. Cloudflare Zero Trust supports Okta integrations using either the OIDC (default) or SAML protocol.

Set up Okta as an OIDC provider

  • On your Okta admin dashboard, navigate to Applications > Applications.
  • Click Create App Integration.
  • For the Sign-in method, select OIDC - OpenID Connect.

Creating an OIDC application in Okta

  • For the Application type, select Web Application. Click Next.

  • Enter any name for the application. In the Sign-in redirect URIs field, input your team domain followed by this callback at the end of the path: /cdn-cgi/access/callback.

For example


  • Select the desired Assignment option and click Save.

  • From the application view, navigate to the Sign On tab.

  • Scroll down to the OpenID ConnectID Token and click Edit.

    Configuring the Groups claim filter in Okta

  • Set the Groups claim filter to Matches regex and its value to .*.

  • In the General tab, copy the Client ID, Client secret, and Okta domain.

    Finding your Client credentials and Okta domain in Okta

  • On the Zero Trust dashboard, navigate to Settings > Authentication.

  • Under Login methods, click Add new and select Okta as your identity provider.

  • Fill in the following information1 2:

    • Name: Name your identity provider
    • App ID: Enter your Okta Client ID.
    • Client secret: Enter your Okta Client secret.
    • Okta account URL: Enter your Okta domain, for example https://<your-domain>
  • Click Save.

To test that your connection is working, navigate to Settings > Authentication > Login methods and click Test next to Okta.

If you encounter the error Failed to fetch user/group information from the identity, double-check your Okta configuration:

  • If you have more than 100 Okta groups, ensure you include the API token.
  • The request may be blocked by the ThreatInsights feature within Okta.

Example API Configuration

  "config": {
    "client_id": "<your client id>",
    "client_secret": "<your client secret>",
    "okta_account": ""
  "type": "okta",
  "name": "my example idp"


  1. (Optional) Create an Okta API token and enter it in the Zero Trust dashboard (the token can be read-only). This will prevent your Okta groups from failing if you have more than 100 groups. 

  2. (Optional) Enable Proof of Key Exchange (PKCE). PKCE will be performed on all login attempts.