- Newest
- Most votes
- Most comments
When encountering an "InvalidClientException" with the error message "Invalid client provided" while using CreateTokenWithIAM for AWS Q Business Trusted Identity Propagation, there are several potential issues to consider:
-
Token Usage Limitation: The web identity token can only be used once with the CreateTokenWithIAM API to prevent token replay attacks. If you're attempting to reuse the same JWT multiple times, this will cause an error. Make sure you're generating a new JWT for each test.
-
Client ID Format: Verify that the client_id parameter exactly matches the application ARN format required by IAM Identity Center. Even minor discrepancies can cause validation failures.
-
JWT Configuration Issues:
- Ensure your JWT's "aud" claim exactly matches the application ARN
- Verify the "iss" claim matches exactly with the configured Trusted Token Issuer URL
- Check that the "sub" claim maps correctly to an existing user in IAM Identity Center
-
Identity-Aware Sessions: Confirm that identity-aware sessions are enabled in your organization's management account. This is required for Amazon Q Business to authenticate users and call APIs.
-
SCIM Synchronization: If you're using an external IdP, ensure that users are properly synchronized to Identity Center through SCIM. Duplicate or missing users can cause authentication issues.
-
Propagation Delays: Although you've waited 45+ minutes, some configuration changes in IAM Identity Center can take longer to fully propagate across all regions and services.
-
Region Considerations: While you've tested in both regions, ensure that the region where you're making the CreateTokenWithIAM call is the same region where your IAM Identity Center instance is configured.
For troubleshooting, I recommend:
- Generate a fresh JWT token for each test attempt
- Double-check the exact format of all parameters, especially the client_id
- Verify that identity-aware sessions are properly configured
- Consider caching the temporary credentials generated by AWS STS AssumeRole for subsequent API calls rather than repeatedly calling CreateTokenWithIAM with new tokens
If the issue persists, examine CloudTrail logs more deeply for any additional context about the validation failure.
Sources
Configure Amazon Q Business with AWS IAM Identity Center trusted identity propagation | AWS Machine Learning Blog
Troubleshoot Amazon Q Business set up errors with IAM Identity Center | AWS re:Post
Access AWS services programmatically using trusted identity propagation | AWS Security Blog
CreateTokenWithIAM - AWS IAM Identity Center
answered a year ago
Relevant content
asked 2 years ago

Based on the AI response above, I can confirm the following:
✅ Token reuse (I generate fresh JWTs) ✅ Client ID format (exact application ARN match) ✅ JWT claims (all correct) ✅ Identity-aware sessions (enabled) ✅ SCPs (not blocking) ✅ Region alignment (tested both)