Embedded AI Assistant: Multi-SSO Configuration Guide
Covers how the auth_key is leveraged in Moveworks Setup to properly identify the correct SSO configuration for a given Embedded AI Assistant Implementation
Overview
This guide explains how to configure the Embedded AI Assistant to support multiple SSO identity providers (IdPs), enabling different user populations to authenticate through different SSO providers while accessing the same Moveworks bot.
Common Use Cases:
- Multiple Azure AD tenants (e.g., Commercial and Government Cloud)
- Supporting acquired companies with separate identity providers
- Different SSO providers for different regions or business units
- Legacy and modern authentication systems running in parallel
How Multi-SSO Works
The Embedded AI Assistant uses an auth_key parameter to determine which SSO configuration to use for each user. The flow works as follows:
- Configuration in Moveworks Setup: Create multiple SSO configs and Embedded AI Assistant Auth configs, each with a unique
auth_key - Runtime Selection: The embedding application passes the appropriate
auth_keywhen loading the Embedded AI Assistant - SSO Redirect: The Embedded AI Assistant redirects the user to the correct IdP based on the
auth_key - Authentication: User authenticates with their designated IdP
- Bot Access: User returns to the application with the Embedded AI Assistant successfully loaded
The auth_key Parameter
The auth_key is an arbitrary identifier you define that connects:
- The Embedded AI Assistant Auth configuration in Moveworks Setup
- The embedding application's initialization code
Example:
- Moveworks Setup: Auth Config with
auth_key = "subsidiary" - Application: Loads Embedded AI Assistant with
?auth_key=subsidiaryparameter
Configuration Steps
Step 1: Create SSO Configurations
Navigation: Setup → Organization Details → SSO
For each identity provider, create a separate SSO configuration:
- Click "Add New SSO Config"
- Set Moveworks Product to
movewebchat - Select your connector (Okta, Azure AD, Ping, etc.)
- Choose protocol (SAML or OIDC)
- Configure IdP settings:
- IDP Issuer: Your IdP's issuer URL
- IDP Client ID: Application client ID from IdP
- IDP Client Secret: Application secret from IdP
- IDP Redirect URI: The callback URL (typically
https://<your-domain>/login/sso/oidc) - User Attribute: Attribute to match users (typically
email) - Identifier Type: How to identify users (EMAIL_ADDR, IDM_USER_ID, etc.)
Important: The redirect URI must match exactly what's configured in your IdP's application settings.
Repeat this process for each identity provider.
Step 2: Create Embedded AI Assistant Auth Configurations
Navigation: Setup → Web Chatbot → Auth Settings
For each SSO configuration created above, create a corresponding Auth config:
- Click "Add New Auth Config"
- Set Auth Key: Choose a descriptive identifier
- First/primary configuration should use
"default" - Additional configurations: use descriptive names (e.g.,
"subsidiary","region2","legacy") - Must be lowercase alphanumeric only
- First/primary configuration should use
- Set Auth Type: Select "Generic SSO"
- SSO Config: Select the corresponding SSO config from Step 1
- Save the configuration
Example Configuration:
| Auth Key | SSO Config | Use Case |
|---|---|---|
default | Primary Azure AD | Main user population |
subsidiary | Subsidiary Azure AD | Acquired company users |
legacy | Okta SAML | Legacy authentication system |
Step 3: Configure Azure AD Applications (or equivalent IdP)
For each identity provider, ensure the application registration is configured:
- Redirect URI: Must match the
idp_redirect_uriin Moveworks Setup - Client Secret: Must be valid and not expired
- API Permissions: Ensure proper permissions are granted
- Token Configuration: Verify required claims are included
Step 4: Configure the Embedding Application
The application embedding the Embedded AI Assistant must determine which auth_key to use for each user and pass it when initializing the assistant.
Determining the auth_key
The embedding application needs logic to identify which IdP each user should use. Common approaches:
Option A: User Attribute
// Check user's department, company, or custom field
if (user.company === "Subsidiary Inc") {
authKey = "subsidiary";
} else {
authKey = "default";
}Option B: Email Domain
// Route based on email domain
if (user.email.endsWith("@subsidiary.com")) {
authKey = "subsidiary";
} else {
authKey = "default";
}Option C: Group Membership
// Check user's group or role
if (user.groups.includes("Legacy-Auth-Users")) {
authKey = "legacy";
} else {
authKey = "default";
}Passing the auth_key to the Embedded AI Assistant
Method 1: URL Parameter
<iframe src="https://your-moveworks-domain/chat?auth_key=subsidiary"></iframe>Method 2: JavaScript Initialization
Moveworks.init({
domain: 'your-moveworks-domain',
authKey: 'subsidiary'
});Method 3: Script Tag with Query Parameter
<script src="https://your-moveworks-domain/chat-client.js?auth_key=subsidiary"></script>Identity Considerations
When using multiple SSO providers, ensure users can be uniquely identified across systems:
Consistent User Identifiers
Users authenticating through different IdPs must map to the same user record in your ITSM/IDAM systems.
Best Practice Options:
- Employee ID (Recommended): Use a consistent employee ID across all IdPs and systems
- Email Normalization: Ensure email addresses are consistent or use converters to normalize them
- Custom Attribute: Use a custom user attribute that's consistent across all systems
Example Identity Flow
User A authenticates via Subsidiary IdP
└─> Returns email: [email protected]
└─> Moveworks maps to ITSM user: [email protected]
└─> User accesses their tickets, knowledge, etc.
This mapping typically requires configuration in the identity ingestion settings.
Testing & Validation
Test Each SSO Configuration
- Test User Setup: Identify test users for each IdP
- Clear Browser Cache: Ensure clean test environment
- Test Authentication Flow:
- Access the Embedded AI Assistant with the appropriate
auth_key - Verify redirect to correct IdP
- Complete authentication
- Verify assistant loads successfully
- Access the Embedded AI Assistant with the appropriate
- Test Bot Functionality: Ensure the assistant works correctly after authentication
Validation Checklist
- Each SSO config created in Moveworks Setup with correct IdP settings
- Each Auth config created with unique
auth_keyvalues - IdP applications configured with matching redirect URIs
- Embedding application logic determines correct
auth_keyper user - Embedding application passes
auth_keyto Embedded AI Assistant correctly - Test users authenticate successfully through each IdP
- Assistant loads and functions correctly for all user populations
- User identity maps correctly to ITSM/other systems
Common Issues & Troubleshooting
Issue: Bot doesn't load after SSO redirect (302 redirect loop)
Symptoms:
- User completes SSO authentication
- Gets redirected back to the application
- Bot fails to render or initialize
Possible Causes:
- Redirect URI mismatch: Moveworks Setup config doesn't match IdP application settings
- Missing auth_key: Application not passing
auth_keyparameter - Incorrect auth_key: Application passes wrong
auth_keyvalue - CSP/CORS issues: Security policies blocking Embedded AI Assistant iframe
Solutions:
- Verify redirect URI matches exactly in both Moveworks Setup and IdP
- Check browser network tab for the
auth_keyparameter in requests - Verify
auth_keyvalue matches an existing Auth config in Moveworks Setup - Check browser console for CSP/CORS errors
Issue: Wrong IdP is used for authentication
Symptoms:
- User is redirected to incorrect IdP
- Authentication succeeds but user has wrong identity
Possible Causes:
- Missing or default auth_key: Application not passing correct
auth_key - Logic error: User determination logic in embedding application is incorrect
Solutions:
- Verify embedding application logic correctly identifies user's IdP
- Add logging to confirm correct
auth_keyis being passed - Test with users from each population to verify routing
Issue: Bot works for some users but not others
Symptoms:
- Primary IdP users can use bot successfully
- Secondary IdP users cannot authenticate or bot doesn't load
Possible Causes:
- Incomplete configuration: Secondary SSO config not fully set up
- Expired credentials: Client secret or certificate expired for secondary IdP
- Identity mapping failure: Users from secondary IdP not mapping to ITSM
Solutions:
- Verify all SSO configs are complete and active
- Check client secrets and certificates for expiration
- Review identity ingestion logs for mapping errors
- Verify test users from secondary IdP exist in ITSM
Issue: Authentication succeeds but user sees "Unauthorized" or empty chat
Symptoms:
- SSO authentication completes successfully
- Bot loads but shows error or empty state
Possible Causes:
- Identity mismatch: User authenticated but not found in Moveworks roster
- Missing channel ID: User record doesn't have Embedded AI Assistant channel information
- Permission issues: User doesn't have access to the Embedded AI Assistant
Solutions:
- Check Moveworks roster for the authenticated user
- Verify user record includes Embedded AI Assistant/web channel identity information
- Review user access permissions and licenses
Best Practices
Planning
- Document user populations: Clearly define which users should use which IdP
- Test with real users: Validate with actual users from each population before rollout
- Plan identity mapping: Ensure user identity strategy works across all systems
- Consider future changes: Plan for adding additional IdPs or migrating users
Naming Conventions
- Use descriptive auth_keys:
"subsidiary"is better than"config2" - Document auth_key usage: Maintain documentation of which auth_key serves which population
- Use "default" for primary: The primary/largest user population should use
auth_key = "default"
Security
- Rotate secrets regularly: Update IdP client secrets on a regular schedule
- Monitor authentication logs: Watch for unusual authentication patterns
- Test after changes: Validate after any SSO or IdP configuration changes
- Use OIDC over SAML: When possible, prefer OIDC for better security and features
Maintenance
- Monitor certificate expiration: Set up alerts for expiring certificates and secrets
- Test regularly: Periodically test authentication flows for all IdPs
- Document changes: Keep configuration documentation up to date
- Review access logs: Regularly review authentication and access logs
Support
For assistance with multi-SSO configuration, contact Moveworks Support with:
- SSO configuration details (screenshots with sensitive data redacted)
- IdP application settings
- Test user examples from each population
- Browser console logs and network traces
- Error messages and authentication flow descriptions
Updated about 2 hours ago