Connect / Client / get_federation_token
get_federation_token¶
- Connect.Client.get_federation_token(**kwargs)¶
Supports SAML sign-in for Connect Customer. Retrieves a token for federation. The token is for the Connect Customer user which corresponds to the IAM credentials that were used to invoke this action.
For more information about how SAML sign-in works in Connect Customer, see Configure SAML with IAM for Connect Customer in the Connect Customer Administrator Guide.
Note
This API doesn’t support root users. If you try to invoke GetFederationToken with root credentials, an error message similar to the following one appears:
Provided identity: Principal: .... User: .... cannot be used for federation with Connect CustomerSee also: AWS API Documentation
Request Syntax
response = client.get_federation_token( InstanceId='string' )
- Parameters:
InstanceId (string) –
[REQUIRED]
The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
- Return type:
dict
- Returns:
Response Syntax
{ 'Credentials': { 'AccessToken': 'string', 'AccessTokenExpiration': datetime(2015, 1, 1), 'RefreshToken': 'string', 'RefreshTokenExpiration': datetime(2015, 1, 1) }, 'SignInUrl': 'string', 'UserArn': 'string', 'UserId': 'string' }
Response Structure
(dict) –
Credentials (dict) –
The credentials to use for federation.
AccessToken (string) –
An access token generated for a federated user to access Connect Customer.
AccessTokenExpiration (datetime) –
A token generated with an expiration time for the session a user is logged in to Connect Customer.
RefreshToken (string) –
Renews a token generated for a user to access the Connect Customer instance.
RefreshTokenExpiration (datetime) –
Renews the expiration timer for a generated token.
SignInUrl (string) –
The URL to sign into the user’s instance.
UserArn (string) –
The Amazon Resource Name (ARN) of the user.
UserId (string) –
The identifier for the user. This can be the ID or the ARN of the user.
Exceptions