Zero Trust Identity Provider SAML OIDC Integration
How to connect enterprise identity providers with SAML 2.0 or OpenID Connect for Zero Trust login, callback URLs, testing, and common SAML errors.
This page summarizes Cloudflare One identity provider documentation: connecting your organization’s identity provider (IdP) to Cloudflare Zero Trust so users authenticate with corporate credentials before Access policies and Gateway rules apply. Configuration happens in both the Cloudflare dashboard and on the IdP side. The same platform also supports using Cloudflare Access as the IdP for third-party SaaS apps; that pattern is covered briefly at the end.
Identity providers in Zero Trust: login methods vs SaaS SSO
Section titled “Identity providers in Zero Trust: login methods vs SaaS SSO”An identity provider stores and manages users’ digital identities. Integrating it with Cloudflare Zero Trust lets you manage access to private applications, the App Launcher, and policy decisions based on who the user is (and, with SCIM or IdP attributes, groups).
An identity provider (IdP) stores and manages users’ digital identities. You can integrate your existing identity provider with Cloudflare Zero Trust in order to manage user access to your private network. This requires configuration both in Cloudflare and with the identity provider itself.
— Cloudflare, Configure an identity provider
Two integration shapes appear throughout the cluster:
| Integration type | Where you configure it | Typical use |
|---|---|---|
| Login method (IdP integration) | Zero Trust → Integrations → Identity providers | Users sign in to Cloudflare Access with Okta, Entra ID, generic SAML, etc. |
| Access for SaaS | Zero Trust → Access controls → Applications → SaaS application | Cloudflare acts as the SSO IdP for Salesforce, Slack, Asana, and similar apps |
Cloudflare then acts as a proxy for the SSO process. Applications are configured using SAML and OIDC to use Cloudflare for authentication and then Cloudflare in turn redirects users through the authentication flow of an integrated IdP.
— Cloudflare, Integrating identity systems
New Zero Trust organizations get the built-in Cloudflare login method by default; you can add corporate IdPs, social logins, and one-time PIN at the same time.
SAML vs OIDC: which protocol to choose
Section titled “SAML vs OIDC: which protocol to choose”If your IdP supports both protocols, Cloudflare recommends OIDC for simpler setup.
If your provider supports both SAML and OIDC, we recommend OIDC for ease of configuration.
— Cloudflare, Identity providers
If the IdP is not in the dashboard list, use generic OpenID Connect or generic SAML 2.0:
You can add your preferred identity providers to Cloudflare Access even if you do not see them listed in Zero Trust, as long as these providers support SAML 2.0 or OpenID Connect (OIDC).
— Cloudflare, Identity FAQ
| Protocol | Cloudflare entry point | IdP must provide |
|---|---|---|
| OIDC | Add identity provider → OpenID Connect (or vendor tile) | Client ID, client secret, auth/token URLs, JWKS (certs_url); redirect URI on IdP |
| SAML 2.0 | Add identity provider → SAML | SSO URL, Entity ID/Issuer, signing certificate; signed assertions |
Connect authentik to Cloudflare Access with OpenID Connect (OIDC). OIDC is the recommended protocol when your identity provider supports both OIDC and SAML.
— Cloudflare, authentik (OIDC)
Access callback URL: the URL every IdP integration shares
Section titled “Access callback URL: the URL every IdP integration shares”Whether you use SAML or OIDC, the IdP almost always needs your team’s Access callback URL. Find team name under Settings → Team name and domain → Team name in the dashboard.
Standard callback (login methods and most IdP apps):
https://<your-team-name>.cloudflareaccess.com/cdn-cgi/access/callback
Examples from vendor guides:
- Generic OIDC — authorized redirect URI on the IdP
- Generic SAML 2.0 — Entity/Issuer and SSO URL often both set to the callback URL for SP-initiated flows
- Microsoft Entra ID — Web redirect URI when registering the app
- Active Directory Federation Services (AD FS) — Relying party SAML 2.0 SSO service URL and identifier
Generic OIDC login method: create client and add to Zero Trust
Section titled “Generic OIDC login method: create client and add to Zero Trust”Create an application on the IdP
Section titled “Create an application on the IdP”On the IdP, create an OAuth/OIDC client and set the redirect URI to the callback URL above. Collect:
- Client ID and client secret
- Authorization endpoint (
auth_url) - Token endpoint (
token_url) - JWKS URL (
certs_url/jwks_uri)
When creating a client/app, your IdP may request an authorized redirect URI. Enter the following URL:
https://<your-team-name>.cloudflareaccess.com/cdn-cgi/access/callback— Cloudflare, Generic OIDC
Add the provider in Cloudflare One
Section titled “Add the provider in Cloudflare One”-
In the Cloudflare dashboard, go to Zero Trust → Integrations → Identity providers → Add new identity provider → OpenID Connect.
-
Enter the client ID, secret, and endpoint URLs from the IdP.
-
(Optional) Enable Proof of Key Exchange (PKCE) if the IdP supports it.
-
(Optional) Add custom OIDC claims under optional configurations for policies and JWTs (custom OIDC claims).
-
Select Save, then Test on the integration (test IdPs).
Amazon Cognito follows the same pattern with pool-specific OAuth URLs and callback on the app client (Amazon Cognito).
Generic SAML 2.0 login method: certificates, metadata, and requirements
Section titled “Generic SAML 2.0 login method: certificates, metadata, and requirements”Minimum IdP requirements
Section titled “Minimum IdP requirements”Minimum requirements for identity providers: The IdP must conform to SAML 2.0. The IdP must provide a Single sign-on URL, an Entity ID or Issuer URL, and a Signing certificate. The IdP must include the signing public key in the SAML response.
— Cloudflare, Generic SAML 2.0
On the IdP, create a SAML application pointing at the callback URL, set Name ID to email where possible, and export the IdP signing certificate (no spaces or line breaks in the Cloudflare paste field per AD FS setup).
Service provider metadata for the IdP
Section titled “Service provider metadata for the IdP”If the IdP accepts SP metadata XML:
- Default:
https://<your-team-name>.cloudflareaccess.com/cdn-cgi/access/saml-metadata - Per–identity-provider:
https://<your-team-name>.cloudflareaccess.com/cdn-cgi/access/<identity-provider-id>/saml-metadata(optional metadata upload)
Add SAML in Zero Trust
Section titled “Add SAML in Zero Trust”In Integrations → Identity providers → Add new identity provider → SAML, enter SSO URL, issuer, and signing certificate. Optionally enable SCIM, SAML attributes, signed AuthN requests, or SAML assertion encryption.
For AD FS, Cloudflare also documents signing the full SAML response:
Set-ADFSRelyingPartyTrust -TargetName "Name of RPT Display Name" -SamlResponseSignature "MessageAndAssertion"— pattern from Active Directory (SAML)
Test identity provider integration in Zero Trust
Section titled “Test identity provider integration in Zero Trust”To test if an IdP is correctly configured: Go to Integrations > Identity providers. Select Test next to the IdP you would like to test. This will attempt to connect to the IdP to verify if a valid connection is established.
— Cloudflare, Identity providers
A successful test opens a browser window with a “Your connection works!” message; failures show an explanation (provider connected / not connected).
Some IdPs need extra dashboard steps (for example, finishing Google Workspace group authorization) before Test returns group data (Google Workspace).
Signed SAML AuthN requests and IdP-side verification
Section titled “Signed SAML AuthN requests and IdP-side verification”When Sign SAML authentication request is enabled (recommended for Okta SAML and others), the IdP must trust Cloudflare’s public certificate:
Go to this URL to find the certificate:
https://<your-team-name>.cloudflareaccess.com/cdn-cgi/access/public-cert— Cloudflare, Signed AuthN requests (SAML)
Ensure that your IdP validation uses the most recent certificate. Cloudflare Access routinely rotates the public key as a security measure.
— Cloudflare, Signed AuthN requests (SAML)
Access for SaaS: Cloudflare as identity provider for applications
Section titled “Access for SaaS: Cloudflare as identity provider for applications”Dozens of cluster documents (Asana, Salesforce, Slack, etc.) repeat one workflow:
- In Access controls → Applications, create a SaaS application with SAML or OIDC.
- Enter the SaaS Entity ID and Assertion Consumer Service URL (or OIDC redirect URL).
- Copy Cloudflare’s SSO endpoint, Entity ID/Issuer, and public key (SAML) or OIDC client endpoints into the SaaS admin console.
- Attach Access policies (deny by default until an Allow policy matches).
- Test in an incognito window.
Authoritative generic flows: Generic SAML application and Generic OIDC application.
For SAML SaaS, Cloudflare signs both Response and Assertion with SHA-256; the SaaS vendor validates using the uploaded public key (Validate SAML Response). SaaS metadata is often available at <SSO endpoint>/saml-metadata.
OIDC SaaS exposes a discovery URL such as:
https://<your-team-name>.cloudflareaccess.com/cdn-cgi/access/sso/oidc/<client-id>/.well-known/openid-configuration
Apply instant authentication skips the Cloudflare login chooser when a single corporate IdP backs the SaaS app (same option appears on generic SaaS and dashboard SSO apps).
NameID and attributes beyond email
Section titled “NameID and attributes beyond email”Default NameID is the user’s email. Non-email NameIDs (employee ID, sandbox email variants) use API field name_id_transform_jsonata on the Access application (NameID transform).
Map IdP SAML/OIDC attributes to SaaS-required claims in the SaaS application settings; required attributes that the IdP does not send cause authentication to fail with an error page (SAML attribute statements).
One-time PIN and multiple identity providers
Section titled “One-time PIN and multiple identity providers”OTP needs no IdP configuration: add the One-time PIN login method and allow the user’s email in an Access policy.
Some admins choose to test by authenticating with a one-time PIN (OTP) instead of an IdP. OTP can also be used as an alternative login method for contractors or other guests that are not part of your IdP.
— Cloudflare, Configure an identity provider
Cloudflare supports multiple IdPs at once (for example, two Okta tenants) so policies stay centralized when you change vendors (Integrating identity systems).
SAML verification failure: certificate and signing key errors
Section titled “SAML verification failure: certificate and signing key errors”If testing or login shows SAML Verify: Invalid SAML response or No certificate selected to verify, the IdP response does not include a signing public key that matches the certificate stored in Zero Trust.
The error SAML Verify: Invalid SAML response, SAML Verify: No certificate selected to verify occurs when the identity provider (IdP) does not include the signing public key in the SAML response. Cloudflare Access requires the public key to match the Signing certificate uploaded to Zero Trust. Configure your IdP to include the public key in the response.
— Cloudflare, Troubleshoot Access
The same guidance appears under Access troubleshooting (SAML). Fix paths: re-export the current token-signing cert, paste it without stray whitespace, enable assertion/response signing on the IdP (AD FS MessageAndAssertion), and update Cloudflare before cert rotation on authentik (authentik SAML).
Other common mistakes
Section titled “Other common mistakes”| Mistake | Consequence | Mitigation |
|---|---|---|
| Wrong or outdated signing certificate in Zero Trust | SAML verify errors | Match live IdP cert; set expiry reminders (Generic SAML 2.0) |
| Callback URL typo or wrong team name | Redirect errors after login | Copy team name from dashboard settings |
| Entra ID client secret expired | All logins fail | Renew secret in Entra and Cloudflare (Microsoft Entra ID) |
| UPN ≠ email but policies use email | Wrong user identity in policies | Add email claim in Entra token configuration (UPN and email) |
| Google Workspace behind Access using Google as IdP | Authentication loop | Use a non-Google IdP for login (Google Workspace SaaS) |
| AWS Access for SaaS without SCIM | Users must exist in AWS with matching email usernames | Manual provisioning (AWS SaaS SSO) |
Vendor-specific setup (Okta OIDC vs SAML, JumpCloud metadata upload, Keycloak mappers, etc.) follows the same callback-and-certificate pattern; use the linked IdP page from Identity providers rather than copying a different vendor’s fields.
How to check this on your site
Section titled “How to check this on your site”- In the Cloudflare dashboard, open Zero Trust → Integrations → Identity providers, select Test next to your IdP, and confirm the success message after completing the IdP login flow.
- For a protected self-hosted or SaaS app, open its login URL in an incognito window and verify you reach the Access screen, pass policy, and land in the application (generic SAML SaaS test).
- If SAML fails, compare the IdP’s active signing certificate with the Signing certificate field in Zero Trust and check IdP logs against SAML verification failure guidance.
- For signed AuthN requests, confirm the IdP trusts the current cert from
https://<your-team-name>.cloudflareaccess.com/cdn-cgi/access/public-cert(Signed AuthN requests). - You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about so it can be corrected or explained.