getIdentityContext
Retrieves the identity context for a Quick Sight user in a specified namespace, allowing you to obtain identity tokens that can be used with identity-enhanced IAM role sessions to call identity-aware APIs.
Currently, you can call the following APIs with identity-enhanced Credentials
Supported Authentication Methods
This API supports Quick Sight native users, IAM federated users, and Active Directory users. For Quick Sight users authenticated by Amazon Web Services Identity Center, see Identity Center documentation on identity-enhanced IAM role sessions.
Getting Identity-Enhanced Credentials
To obtain identity-enhanced credentials, follow these steps:
Call the GetIdentityContext API to retrieve an identity token for the specified user.
Use the identity token with the STS AssumeRole API to obtain identity-enhanced IAM role session credentials.
Usage with STS AssumeRole
The identity token returned by this API should be used with the STS AssumeRole API to obtain credentials for an identity-enhanced IAM role session. When calling AssumeRole, include the identity token in the ProvidedContexts parameter with ProviderArn set to arn:aws:iam::aws:contextProvider/QuickSight and ContextAssertion set to the identity token received from this API.
The assumed role must allow the sts:SetContext action in addition to sts:AssumeRole in its trust relationship policy. The trust policy should include both actions for the principal that will be assuming the role.