Reputation: 2814
I have below user groups in aws cognito. Admin Member Paid member
I want to assign all user to Member user group as default when they sign up on my application so I can assign different IAM role on that user group.
How do I assign user to a user group programmatically?
Upvotes: 15
Views: 24636
Reputation: 2814
I found that I can use adminAddUserToGroup
to add user to the specific group you have set on AWS Cognito.
http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentityServiceProvider.html#adminAddUserToGroup-property
Upvotes: 15