Set Up Entra ID (Azure AD) Directory

In this guide, you will configure Microsoft Entra ID (formerly Azure AD) as a SAML identity provider for Guardrails. This is a three-phase process: create a SAML enterprise application in Entra ID, create the directory in Guardrails, then update the callback URL in Entra ID.

If you want SAML group syncing after setup, see the group sync section at the end of this guide.

Prerequisites

Step 1: Create a SAML App in Entra ID

Add an Enterprise Application

  1. Sign in to the Microsoft Entra admin center.

  2. Navigate to Enterprise Applications > New application.

  3. Select Create your own application.

  4. Enter Turbot Guardrails as the display name.

  5. Choose Integrate any other application you don't find in the gallery and click Create.

Configure SAML Sign-On

  1. On the application overview page, navigate to Manage > Single sign-on and select SAML.

  2. In the Basic SAML Configuration section, click Edit and enter:

SettingValue
Identifier (Entity ID)Your Guardrails workspace URL (e.g., https://your-workspace.cloud.turbot.com)
Reply URL (ACS URL)Enter a placeholder for now (e.g., https://your-workspace.cloud.turbot.com/api/latest/directories/placeholder/saml/callback). You'll update this after creating the directory in Guardrails.
Sign on URLYour Guardrails login URL (e.g., https://your-workspace.cloud.turbot.com/login)
  1. Click Save.

Configure User Attributes and Claims

Guardrails requires specific SAML claims. The default Entra ID claims use schema-prefixed names that Guardrails doesn't recognize. You need to replace them.

  1. In the Attributes & Claims section, click Edit.

  2. Delete all default claims that start with http://schemas.xmlsoap.org/. If these remain, Guardrails profiles will have blank data fields.

Entra ID Attributes & Claims before removing default schema-prefixed claims

  1. Click Add new claim for each of the following. Attribute names are case-sensitive:
Claim NameSource AttributeNotes
emailuser.userprincipalname or user.mailUse user.mail if your users have mailboxes. Use user.userprincipalname if mail is not set.
nameIduser.userprincipalname, user.mail, or user.samaccountnameShould uniquely identify the user.
displayNameuser.displayname
firstNameuser.givenname
lastNameuser.surname
  1. Click Save.

Entra ID Attributes & Claims after configuring the required claims

Download the Certificate

Entra ID SAML Signing Certificate section with Certificate (Base64) download link

  1. In the SAML Signing Certificate section, download the Certificate (Base64) file. The contents start with -----BEGIN CERTIFICATE-----.

  2. Also copy the Login URL from the Set up Turbot Guardrails section. This is the Entry Point.

Step 2: Create the SAML Directory in Guardrails

  1. Navigate to Workspace > Directories.

  2. Click Create Directory and select SAML.

Create SAML Directory form with Title, Entry Point, Issuer, Certificate, and Profile ID Template fields

  1. Fill in the directory details:
FieldDescription
TitleDisplayed on the login screen. Example: Acme Corp Entra ID.
DescriptionOptional.
Entry PointThe Login URL from the Entra ID SAML configuration.
IssuerYour Guardrails workspace URL (e.g., https://your-workspace.cloud.turbot.com).
CertificatePaste the full Base64 certificate contents.
Profile ID TemplateDefault {{profile.email}} works for most cases. Cannot be changed after creation.
  1. Configure optional settings:
OptionGuidance
Name ID FormatUnspecified works for most setups. Switch to Email Address if needed.
SignatureConfigure if your organization requires signed SAML requests.
Allow IdP-Initiated SSOEnable if users will launch Guardrails from the Entra ID My Apps portal.
Require Signed Authentication ResponseIf enabled, set the Entra ID signing option to Sign SAML response and assertion.
Strict Audience ValidationOnly enable if the Issuer matches your workspace URL exactly.
  1. Click Create.

  2. Click the new directory to open its detail view. Copy the Callback URL.

Step 3: Update the Reply URL in Entra ID

  1. Go back to the Entra ID SAML configuration for your Guardrails application.

  2. In Basic SAML Configuration, click Edit.

  3. Replace the placeholder Reply URL with the Callback URL from the Guardrails directory. The format is https://{workspace-url}/api/latest/directories/{directoryId}/saml/callback.

  4. Click Save.

Step 4: Assign Users

  1. In Entra ID, navigate to your Guardrails application > Users and groups.

  2. Click Add user/group and assign the users or groups who should have access.

Step 5: Activate and Test

  1. Back in Guardrails, navigate to Workspace > Directories.

  2. Click the Activate action on the new SAML directory.

  3. Open an incognito or private browser window.

  4. Navigate to your Guardrails workspace URL.

  5. Select the new directory from the login dropdown and sign in.

  6. After signing in, verify the profile was created correctly. Check that the display name, email, first name, and last name are populated. If any fields are blank, adjust the SAML claims and sign in again.

  7. The user has no permissions until an administrator grants them.

Group Sync (Optional)

To sync Entra ID groups to Guardrails profiles:

  1. In the Guardrails directory settings, set Profile Groups Attribute to the attribute name you'll use for group claims, enable Allow Group Syncing, and optionally configure a Group Filter regex.

  2. In Entra ID, go to Attributes & Claims > Add a group claim. Configure which groups to include and the attribute name to match what you set in Guardrails.

Entra ID group claims configuration showing group attribute options

  1. Ensure both users and groups are assigned to the enterprise application under Users and groups.

  2. Groups sync on each user login, not proactively.

Troubleshooting

IssueSolution
InResponseTo is missing from responseEnable Allow IdP-Initiated SSO in the Guardrails directory advanced settings.
SAML assertion audience mismatchDisable Strict Audience Validation, or ensure the Issuer matches the Identifier (Entity ID) in Entra ID.
Profile fields are blank after loginDelete the default schema-prefixed claims and add the required claims. Attribute names are case-sensitive.
Signed authentication response is requiredIn Entra ID, set the signing option to Sign SAML response and assertion (not just the assertion).
User can sign in but can't see anythingExpected: they have no permission grants yet. Grant them permissions.

Next Steps