Get User Group in Swift using AWS Cognito

0 votes
I've implemented Amazon Cognito login on an iOS app in Swift.
However I'm now trying to find out the groups that a logged in user belongs to.
The SDK doesn't seem to provide a way of doing so from what I can see.
I can't seem to find a good way of doing this from within the app.
Any help would be much appreciated!

Nov 12, 2018 in AWS by findingbugs
• 3,140 points
233 views

1 answer to this question.

0 votes

The groups are exposed in the ID token issued to the user. 

It is populated in claim "cognito:groups". 

For more details please view the article here: http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-user-groups.html

answered Nov 12, 2018 by Priyaj
• 56,520 points

Related Questions In AWS

0 votes
1 answer
+5 votes
2 answers

Can we migrate the AWS Cognito users between the user pools?

Yes, it is possible that this scenario ...READ MORE

answered Apr 13, 2018 in AWS by Cloud gunner
• 4,260 points
2,051 views
0 votes
1 answer

how to access AWS S3 from Lambda in VPC

With boto3, the S3 urls are virtual by default, ...READ MORE

answered Sep 28, 2018 in AWS by Priyaj
• 56,520 points
1,654 views
0 votes
1 answer
0 votes
1 answer

Do you get charged for a security group in AWS EC2?

There is no charge applicable to Security ...READ MORE

answered Jul 18, 2018 in AWS by Priyaj
• 56,520 points
40 views
+1 vote
2 answers

How do I get my AWS Glue client in JAVA?

Hey, you've been using a correct code ...READ MORE

answered Apr 17, 2018 in AWS by Cloud gunner
• 4,260 points
898 views