matthelam logo
Published on

Azure Entra ID SSO – Setting up Sitecore Cloud Portal

Authors
  • avatar
    Name
    Matt Lam

Introduction

Now that the Azure Entra ID side is complete, it’s time to bring Sitecore Cloud Portal into the loop. This article covers the Cloud Portal side of the SAML setup: uploading the IdP metadata, creating the SSO connection, mapping incoming claims (like groups) into target claims that Cloud Portal adds to tokens, and running the first authentication tests.

Before you begin, make sure you’ve already collected:

  • The Federation Metadata XML exported from Azure: /sso/cloudportal-saml-[ENV].xml
  • A list of Azure Group Object IDs and test users from your Preparation Checklist

This is the foundation step for SSO across Sitecore services. The same connection will later drive role propagation into XM Cloud (now SitecoreAI).


1. Add a New SSO Connection in Cloud Portal

  1. Sign in to Sitecore Cloud Portal as an organisation or cloud administrator.
  2. Navigate to Admin → SSO.
  3. Click Add SSO Connection → SAML.
  4. Name the connection by environment:
    • Azure-SAML-DEV
    • Azure-SAML-UAT
    • Azure-SAML-PROD
  5. Add allowed email domains (e.g., yourcompany.com) so only trusted corporate accounts use SSO.

Pro Tip: Keep your connection names consistent across environments - it simplifies configuration, logging, and certificate management.


2. Upload Federation Metadata

  1. Choose Upload IdP Metadata.
  2. Select your exported XML: [Cloud Portal Metadata File].
  3. Save.

Cloud Portal parses and displays the IdP Issuer, SSO URL, and Certificate. Double-check these against the Enterprise Application → Single sign-on → SAML pane in Azure to confirm they match.

If you see an error parsing the XML, re-download the metadata from Azure - older cached versions often contain outdated certificates.


3. Claims Mapping for Role Propagation

Cloud Portal can transform IdP claims into new claims attached to the issued Sitecore access token. This is where you bridge Azure group membership to Sitecore roles by generating an xmc_role claim.

  1. assigned to the Enterprise Application
  2. received by the SSO connection
  3. adds a target claim
  4. referenced by

Step 1 of 5

Entra ID security group

The user is a member of a security group, identified by its Object ID (GUID) rather than its display name.

How an Entra ID group membership becomes an XM Cloud role. The prefixed name from the token step is the one XM Cloud must use.

3.1 Design your mapping

Create a mapping table per environment:

Azure Group (Object ID)Target Claim NameTarget Claim Values (Array)
[Entra ID GUID]xmc_role["sitecore\\Administrator"]
[Entra ID GUID]xmc_role["sitecore\\Author"]
[Entra ID GUID]xmc_role["sitecore\\Sitecore Client Publishing"]

Why xmc_role? The target claim name is arbitrary, but xmc_role is a common convention since it’s later referenced in XM Cloud role mappings. Cloud Portal automatically prefixes it with your SSO Connection ID during token issuance, for example:

xmc-connection-12345.xmc_role

3.2 Configure mapping in Cloud Portal UI

  1. Go to Claims Mapping in your SSO connection.
  2. Click Add Mapping.
  3. Add a Source Claim:
    • Name: groups
    • Value (Regex): match the group Object ID (e.g., ^00000001-0001-0001-0001-000000000001$)
  4. Add a Target Claim:
    • Name: xmc_role
    • Values: sitecore\\Administrator
  5. Save the mapping and repeat for each group/role.

3.3 JSON representation (optional via API)

If you prefer to define mappings via JSON configuration (for automation or documentation):

{
  "claimsMapping": [
    {
      "sourceClaims": [{ "name": "groups", "value": "^00000001-0001-0001-0001-000000000001$" }],
      "targetClaims": [{ "name": "xmc_role", "value": "sitecore\\Administrator" }],
    },
    {
      "sourceClaims": [{ "name": "groups", "value": "^00000002-0002-0002-0002-000000000002$" }],
      "targetClaims": [{ "name": "xmc_role", "value": "sitecore\\Author" }],
    },
  ],
}

Role Mapping Pro Tip: In Cloud Portal Claims Mapping, you add source claims (from the IdP) and target claims (added by Cloud Portal to ID/access tokens).

  • Target claim names are arbitrary (e.g., xmc_role).
  • Source claim values can use regex, values must be strings or arrays, and you can have up to 20 source claims per mapping.
  • Target claim names are prefixed with the SSO connection ID at issue time.

Official documentation:


4. Testing SSO and Token Claims

Once mapping is saved:

  1. Sign out of Cloud Portal.

  2. Sign in again - it should redirect to Azure Entra ID.

  3. Use your test accounts:

    • [admin-test@yourcompany.com]
    • [editor-test@yourcompany.com]
  4. Confirm:

    • The login flow completes successfully.

    • The token now includes your prefixed target claim:

      "xmc-connection-12345.xmc_role": ["sitecore\\Administrator"]
      

Hot Tip – Token Inspection: Cloud Portal doesn’t always show the full token. To verify claims, copy the Bearer token from your browser’s Network tab (Authorization: Bearer ...) and paste it into jwt.ms to decode it. Sometimes the token appears in the UI under “System Information”; otherwise you must capture it from the network traffic.


5. Troubleshooting Role Mapping

SymptomLikely CauseHow to Fix
Login works, but no roles appear in XM CloudWrong or missing target claim prefixUse the exact prefixed name (e.g., xmc-connection-12345.xmc_role) in XM Cloud.
Cloud Portal shows claim warningSource claim is not a string/arrayAzure must emit Object IDs as strings.
Only some users receive rolesRegex too restrictiveLoosen the expression or duplicate entries for each matching group.
Duplicate or conflicting rolesMultiple target claim namesUse one target claim name (xmc_role) with multiple role values to avoid ambiguity.
Domain conflict when adding connectionDomain already mapped to another SSOEach domain can belong to only one SSO connection.
Metadata expiredOld certificate or outdated XMLRe-upload current metadata from Azure.
Overlapping mappings / multiple target claimsSeveral mappings fire on the same source claimKeep a single target claim name (e.g., xmc_role) and define multiple roles in the same array.
Token inspection in UIClaims not visibleUse jwt.ms to decode the Bearer token from browser traffic.

Validate

By this stage, you should have:

  • Working SAML trust between Azure Entra ID and Sitecore Cloud Portal
  • Valid token inspection showing your xmc_role claim
  • A functional base for role propagation into XM Cloud

Summary

You’ve created the SAML connection, uploaded the Azure metadata, configured claims mapping with target xmc_role claims, tested SSO and verified the token. That leaves you ready for downstream XM Cloud role mapping.

In the next article, we’ll walk through how to set up Content Hub, configure the SAML connection there, and conduct validation checks.