CognitoIdentityProvider / Client / get_user_auth_factors
get_user_auth_factors#
- CognitoIdentityProvider.Client.get_user_auth_factors(**kwargs)#
Lists the authentication options for the currently signed-in user. Returns the following:
The user’s multi-factor authentication (MFA) preferences.
The user’s options in the
USER_AUTHflow that they can select in aSELECT_CHALLENGEresponse or request in a ``PREFERRED_CHALLENGE``request.
See also: AWS API Documentation
Request Syntax
response = client.get_user_auth_factors( AccessToken='string' )
- Parameters:
AccessToken (string) –
[REQUIRED]
A valid access token that Amazon Cognito issued to the user whose authentication factors you want to view.
- Return type:
dict
- Returns:
Response Syntax
{ 'Username': 'string', 'PreferredMfaSetting': 'string', 'UserMFASettingList': [ 'string', ], 'ConfiguredUserAuthFactors': [ 'PASSWORD'|'EMAIL_OTP'|'SMS_OTP'|'WEB_AUTHN', ] }
Response Structure
(dict) –
Username (string) –
The username of the currently sign-in user.
PreferredMfaSetting (string) –
The user’s preferred MFA setting.
UserMFASettingList (list) –
The MFA options that are activated for the user. The possible values in this list are
SMS_MFA,EMAIL_OTP, andSOFTWARE_TOKEN_MFA.(string) –
ConfiguredUserAuthFactors (list) –
The authentication types that are available to the user with
USER_AUTHsign-in.(string) –
Exceptions
CognitoIdentityProvider.Client.exceptions.ResourceNotFoundExceptionCognitoIdentityProvider.Client.exceptions.InvalidParameterExceptionCognitoIdentityProvider.Client.exceptions.NotAuthorizedExceptionCognitoIdentityProvider.Client.exceptions.TooManyRequestsExceptionCognitoIdentityProvider.Client.exceptions.PasswordResetRequiredExceptionCognitoIdentityProvider.Client.exceptions.UserNotFoundExceptionCognitoIdentityProvider.Client.exceptions.UserNotConfirmedExceptionCognitoIdentityProvider.Client.exceptions.InternalErrorExceptionCognitoIdentityProvider.Client.exceptions.ForbiddenException