Skip to content
Dashboard
Theme
Theme

Cloudflare Access SAML single sign-on

Set up SAML single sign-on with Cloudflare Access

View Markdown

Create a SAML 2.0 app in Cloudflare Access, paste the values from this setup, assign your users and share the identity provider metadata with us.

The values in braces, such as {acs_url}, are specific to your connection. The setup link from the application you are connecting shows them with a copy button. The same steps appear there.

  1. In the admin console of Cloudflare Access, create a new SAML 2.0 application for this app. Cloudflare Access may call it a custom app, a service provider or a relying party. Give it a name your users will recognize.

  2. Paste {acs_url} into the assertion consumer service (ACS) URL field, which may be labelled single sign-on URL or reply URL. If the app also has recipient or destination fields, use the same value there.

    Paste into Cloudflare Access:

    • ACS URL: {acs_url}

    Fixes: saml_destination_mismatch, saml_response_malformed

  3. Paste {sp_entity_id} into the service provider entity ID field, which may be labelled audience, audience URI or identifier.

    Paste into Cloudflare Access:

    • SP entity ID: {sp_entity_id}

    Fixes: saml_audience_mismatch

  4. Set the name ID format to email address and send each user’s email address as the name ID.

    Fixes: saml_nameid_missing

  5. Make sure Cloudflare Access signs the SAML response, the assertion or both, and uses SHA-256 (RSA-SHA256) as the signature algorithm.

    Fixes: saml_signature_missing, saml_signature_algorithm_weak

  6. Add an attribute named email with the email address. Add first and last name attributes too if Cloudflare Access lets you.

    Fixes: saml_email_missing

  7. Assign the people or groups who should sign in to this app with single sign-on.

    Fixes: saml_idp_status_error

  8. Download the app’s SAML metadata file and upload it in this setup. Cloudflare Access offers the metadata as a file rather than a stable URL, so upload a new file whenever the signing certificate changes.

    Fixes: saml_signature_invalid, saml_issuer_mismatch

  9. Run a test sign-in in this setup, signing in as a user you assigned to the app.

If our main network ever has an outage, sign-ins can continue through a standby address, but only if Cloudflare Access accepts it. If the app’s SAML settings take more than one ACS URL, add {standby_acs_url} as a second one and confirm in this setup that you added it. If they take only one, skip this step.

Paste into Cloudflare Access:

  • Standby ACS URL: {standby_acs_url}

This step is optional. See standby route behavior for what the standby address does during an outage.