This guide covers how to configure Datadog ↗︎ as a SAML application in Cloudflare One.
- An identity provider configured in Cloudflare One
- Administrator access to a Datadog organization, or a custom role with the
Org Managementpermission - SAML turned on for your Datadog organization. If SAML is not available, contact Datadog support ↗︎.
- In Datadog, go to Organization Settings > Login Methods.
- Under SAML, select Configure.
- 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
-
In a separate tab or window, open the Cloudflare dashboard ↗︎ and go to Zero Trust > Access controls > Applications.
-
Select Create new application > SaaS application.
-
For Application, select Datadog.
-
For the authentication protocol, select SAML.
-
Select Add application.
-
Fill in the following fields:
- Entity ID: Datadog Entity ID
- Assertion Consumer Service URL: Datadog Assertion Consumer Service URL
- Name ID format: Email
-
(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.6URI emailurn:oid:2.5.4.42URI The first name of the user urn:oid:2.5.4.4URI 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 ↗︎. -
(Optional) To map identity provider groups to Datadog roles or teams, use the
groupsattribute. To learn more, refer to Datadog SAML group mapping ↗︎. -
Download your SAML metadata XML file from Access, and upload it to Datadog:
- Copy the SAML Metadata endpoint.
- 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). - Save the page as
access_saml_metadata.xml.
-
Configure Access policies for the application.
-
Save the application.
- Return to Organization Settings > Login Methods > SAML in Datadog.
- Select Add SAML.
- Enter a name for this SAML provider, for example
Cloudflare Access. Users see this name when they select a login method. - Upload your
access_saml_metadata.xmlfile. - 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.
IdP-initiated login lets users open Datadog from the App Launcher.
- In Datadog, go to the SAML configuration page.
- Under Additional Features, select Identity Provider (IdP) Initiated Login.
- Select Save Changes.
- 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>. - In Cloudflare One, edit the Datadog application.
- Replace the Assertion Consumer Service URL with the new URL.
- 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.
- Open an incognito browser window.
- 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.