Skip to content

Datadog

This guide covers how to configure Datadog ↗︎ as a SAML application in Cloudflare One.

Prerequisites

  • An identity provider configured in Cloudflare One
  • Administrator access to a Datadog organization, or a custom role with the Org Management permission
  • SAML turned on for your Datadog organization. If SAML is not available, contact Datadog support ↗︎.

1. Get Datadog URLs

  1. In Datadog, go to Organization Settings > Login Methods.
  2. Under SAML, select Configure.
  3. Copy the Entity ID and the Assertion Consumer Service URL. You will need these values when you configure the SaaS application in Cloudflare One.

The URLs depend on your Datadog site ↗︎. For example, on the US1 site the values are:

  • Entity ID: https://app.datadoghq.com/account/saml/metadata.xml
  • Assertion Consumer Service URL: https://app.datadoghq.com/account/saml/assertion

2. Add a SaaS application to Cloudflare One

  1. In a separate tab or window, open the Cloudflare dashboard ↗︎ and go to Zero Trust > Access controls > Applications.

  2. Select Create new application > SaaS application.

  3. For Application, select Datadog.

  4. For the authentication protocol, select SAML.

  5. Select Add application.

  6. Fill in the following fields:

    • Entity ID: Datadog Entity ID
    • Assertion Consumer Service URL: Datadog Assertion Consumer Service URL
    • Name ID format: Email
  7. (Optional) Add SAML attribute statements to update the user profile in Datadog. Datadog reads these attributes:

    Name Name format IdP claim
    urn:oid:1.3.6.1.4.1.5923.1.1.1.6 URI email
    urn:oid:2.5.4.42 URI The first name of the user
    urn:oid:2.5.4.4 URI The last name of the user

    The first attribute is eduPersonPrincipalName. If it is present, Datadog uses its value as the username instead of the NameID. Thus, its value must also be the email address of the user. The first name and last name claims must come from your identity provider. To learn more, refer to Datadog supported attributes ↗︎.

  8. (Optional) To map identity provider groups to Datadog roles or teams, use the groups attribute. To learn more, refer to Datadog SAML group mapping ↗︎.

  9. Download your SAML metadata XML file from Access, and upload it to Datadog:

    1. Copy the SAML Metadata endpoint.
    2. In a separate browser window, go to the SAML Metadata endpoint (https://<your-team-name>.cloudflareaccess.com/cdn-cgi/access/sso/saml/xxx/saml-metadata).
    3. Save the page as access_saml_metadata.xml.
  10. Configure Access policies for the application.

  11. Save the application.

3. Complete Datadog configuration

  1. Return to Organization Settings > Login Methods > SAML in Datadog.
  2. Select Add SAML.
  3. Enter a name for this SAML provider, for example Cloudflare Access. Users see this name when they select a login method.
  4. Upload your access_saml_metadata.xml file.
  5. Select Save.

Datadog shows a Single Sign-on URL at the top of the SAML configuration page. Users go to this URL to start an SP-initiated login.

4. (Optional) Turn on IdP-initiated login

IdP-initiated login lets users open Datadog from the App Launcher.

  1. In Datadog, go to the SAML configuration page.
  2. Under Additional Features, select Identity Provider (IdP) Initiated Login.
  3. Select Save Changes.
  4. Copy the new Assertion Consumer Service URL. This URL contains /id/ followed by your company ID. For example, https://app.datadoghq.com/account/saml/assertion/id/<company-id>.
  5. In Cloudflare One, edit the Datadog application.
  6. Replace the Assertion Consumer Service URL with the new URL.
  7. Save the application.

If you do not update the URL, Datadog cannot associate the assertion with your organization. Datadog then shows an error that the SAML response is missing the InResponseTo attribute.

5. Test the integration

  1. Open an incognito browser window.
  2. Go to the Datadog Single Sign-on URL.

Datadog redirects you to the Cloudflare Access login screen. Sign in with your identity provider. After authentication, Access redirects you to Datadog.

When the login works, you can make the organization SAML strict ↗︎. In Login Methods, turn off the other login methods. Users then must log in with SAML.

Was this helpful?