I’ve implemented SSO role mapping for several ThingWorx deployments and dealt with this exact issue multiple times. Here’s the complete solution:
Understanding the Problem:
The issue is a mismatch between the SSO group claim format (full DN from AD) and ThingWorx role mapping rules (expecting simple group names). When SAML sends “CN=AssetOperators,OU=Groups,DC=company,DC=com”, ThingWorx is looking for “AssetOperators”.
SSO Group Claim Format Configuration:
You have two options for fixing the format mismatch:
Option 1: Configure IdP to send simplified group names
- In your SAML IdP (Okta/Azure AD/etc.), configure attribute transformation
- Extract CN value from memberOf attribute before sending
- Send only “AssetOperators” instead of full DN
Option 2: Configure ThingWorx to parse full DN format
- Update role mapping rules to use regex pattern matching
- Extract CN value from full distinguished name
- This is more flexible but requires careful regex configuration
Role Mapping Rules in ThingWorx:
Navigate to System > Authenticators > your SSO authenticator
Configure role mapping rules:
<RoleMapping>
<Rule pattern="CN=AssetOperators,.*" role="AssetOperator"/>
<Rule pattern="CN=MaintenanceTeam,.*" role="MaintenanceTech"/>
</RoleMapping>
The pattern uses regex to match the full DN and maps to the corresponding ThingWorx role.
AD Group Membership Verification:
Before implementing fixes, verify the SAML assertion content:
- Open browser dev tools (F12)
- Go to Network tab
- Complete SSO login
- Find the SAML response POST request
- Decode the SAMLResponse parameter (base64)
- Verify memberOf attributes are present
Composer Permission Settings:
After fixing role mapping, verify that the mapped roles have correct permissions:
- Navigate to Organizations & Users > Roles
- Find AssetOperator and MaintenanceTech roles
- Verify they have visibility permissions for asset-tracking mashups
- Check Runtime permissions for data streams and things
- Ensure ServiceInvoke permissions for asset-tracking services
Role Inheritance Considerations:
ThingWorx supports role inheritance, which can affect permissions:
- If AssetOperator inherits from a base role, ensure that inheritance is configured
- Check for permission conflicts between inherited and directly assigned permissions
- Test with a single user first to validate complete permission chain
Testing and Validation:
- Clear user session cache (logout completely)
- Log in with test user from AssetOperators AD group
- Verify user object shows correct role assignment in Composer
- Test access to asset-tracking dashboards
- Check ApplicationLog for any permission denial messages
Common Gotchas:
- Case sensitivity: Group names in SAML are case-sensitive, ensure exact match
- Nested groups: AD nested group memberships may not be included in SAML by default
- Token refresh: Role changes don’t take effect until user logs out and back in
- Permission propagation: New role assignments can take a few minutes to propagate
Implementing these changes should restore dashboard access for your AD groups. The key is ensuring consistent format between what SAML sends and what ThingWorx expects in role mapping rules.