Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Entra ID SSO

How to set up Single Sign-On (SSO) so users can log in to Herd with their Microsoft Entra ID (Azure AD) credentials.

You can set up Entra ID single sign-on yourself in Settings → General → Access → Sign-in. See Connect Microsoft Entra ID single sign-on. This page is for organizations whose Microsoft Entra ID sign-in was set up by Herd support. On the Single sign-on card, that connection shows Microsoft Entra ID with Set up by: Configured by Herd. You can move to the self-serve setup at any time by running the test sign-in and selecting Turn on SSO. Your current sign-in keeps working until you turn the new one on. Turning it on links everyone to a new identity by their verified email address, so add the optional email and xms_edov claims before you test.

Microsoft Entra ID (Azure AD) SSO login and architecture overview

This section sets up Single Sign-On (SSO) so users can log in to Herd with their Microsoft Entra ID (Azure AD) credentials, the same identity they use at work. Authenticating through Microsoft Entra ID means fewer passwords for users to manage, and access control stays with your central identity provider.

The steps cover creating the app registration in Microsoft Entra ID, configuring tokens and permissions, and entering those settings in Herd. Once configured, users sign in through Entra ID, and you control who can access Herd from there, including onboarding, offboarding and auditing accounts.

Herd handles the connection between Microsoft Entra ID and Herd for you. You do not need to look at or manage usernames for single sign-on users.

What you'll need

  • Admin access to your Microsoft Entra ID (Azure AD) tenant

  • A way to share the app registration's Application (client) ID, Directory (tenant) ID and client secret Value with Herd support securely. You do not need access to any AWS account.

  • About 20 minutes

Step 1: Create an app registration for SSO

Note: This is a separate app registration from the User Sync app. SSO requires different settings.

  1. Navigate to Microsoft Entra ID (Azure AD) > App registrations

  2. Click + New registration

  3. Fill in:

    • Name: Herd SSO (or any name you prefer)

    • Supported account types: Select "Accounts in this organizational directory only"

    • Redirect URI:

      • Platform: Web

      • URL: https://your-cognito-domain.auth.<region>.amazoncognito.com/oauth2/idpresponse

        • Replace <region> with the AWS region of your Herd deployment's Cognito user pool. This is not always us-west-2, so copy the exact Cognito domain from your Herd contact.

  4. Click Register

Step 2: Note your IDs

Copy these values from the Overview page:

Field
Where to Find It

Application (client) ID

Overview page

Directory (tenant) ID

Overview page

Step 3: Create a client secret

  1. Go to Certificates & secrets

  2. Click + New client secret

  3. Add a description (e.g., "Herd SSO")

  4. Choose an expiration (recommended: 24 months)

  5. Click Add

  6. Copy the secret Value immediately. You won't be able to see it again.

Common mistake: Copy the Value column, not the Secret ID column. Using the Secret ID will cause authentication to fail.

Step 4: Configure token claims

Microsoft Entra ID (Azure AD) needs to put the user's email in the token and mark it as verified:

  1. Go to Token configuration

  2. Click + Add optional claim

  3. Select ID token type

  4. Check these claims:

    • email

    • xms_edov

  5. Click Add

Herd signs people in by email only when Entra marks it verified (xms_edov) and the address is on one of your organization's email domains.

Step 5: Configure API permissions

  1. Go to API permissions

  2. Click + Add a permission

  3. Select Microsoft Graph

  4. Select Delegated permissions

  5. Add these permissions:

    • openid

    • profile

    • email

  6. Click Add permissions

  7. Click Grant admin consent for [Your Organization]

  8. Share your credentials with Herd support, and we'll complete the configuration

To control who can sign in, set Assignment required? to Yes under Enterprise applications → your Herd app → Properties and assign the people and groups who should have access.

PKCE. Herd's sign-in page uses PKCE (S256) automatically on its own leg of the login. The leg between Entra ID and Herd's identity broker does not use PKCE by default; if your policy requires it there, ask your Herd representative. Herd can switch your organization to a PKCE-capable connection, which involves adding one extra redirect URI (provided by Herd) to the app registration.

SSO Troubleshooting

Error: "Invalid client secret provided"

Cause: You copied the wrong value when creating the client secret.

Fix:

  1. Go to Azure AD → App Registrations → your SSO app → Certificates & secrets

  2. Create a new client secret

  3. Copy the Value column (NOT the "Secret ID")

  4. Send the new secret Value to Herd support to update your connection, or select Reconfigure on the Single sign-on card in Settings → General → Access → Sign-in to enter it yourself. Herd tests the new secret before it replaces the old one. After a passing test, select Turn on SSO.

Error: "Access Token does not have required scopes"

This error appears in backend logs when the Cognito access token doesn't have the scopes needed to call Cognito's GetUser API.

Cause: This is expected for federated (SSO) users. The system automatically falls back to extracting email from the ID token.

Fix: No action needed if authentication succeeds. If it fails:

  1. Verify Entra releases a verified email (the email and xms_edov optional claims, Step 4)

  2. Run the test again in Settings → General → Access → Sign-in

Error: User not found / Cannot create user

Cause: The user doesn't exist in Herd and couldn't be auto-created.

Fix:

  1. Run Azure AD User Sync first to import users

  2. Or make sure Entra releases a verified email (the email and xms_edov claims) on one of your organization's email domains

Error: "Token does not belong to requested organization"

Cause: Token issuer mismatch during token refresh.

Fix:

  1. Clear browser storage and cookies

  2. Log out completely

  3. Log in again

SSO login not redirecting to Microsoft Entra ID

Cause: Single sign-on is not set up or not turned on for your organization.

Fix:

  1. Open Settings → General → Access → Sign-in and confirm SSO is turned on after a passing test in the Single sign-on card

  2. If it still does not redirect, contact Herd support

Last updated