Cognito AssociateSoftwareToken: token does not have required scopes

Viewed 4964

I am setting up TOTP-based MFA in Cognito according to the official documentation. The user pool is configured, the next step is to associate the token. Using boto3:

client = boto3.client('cognito-idp')
client.associate_software_token(access_token)

Which returns the error:

NotAuthorizedException when calling the AssociateSoftwareToken operation: 
Access Token does not have required scopes

The token has the scopes email profile openid. What am I missing, what other scopes does it expect?

2 Answers

Following up on the (correct) answer by @Aleksandar Wons above, here's a screenshot that shows how/where to set the aws.cognito.signin.user.admin scope in your Cognito app client.

enter image description here

Related