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
143 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,140 points

Related Questions In AWS

+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,240 points
1,534 views
+5 votes
2 answers

Can we export/migrate users from AWS cognito, does it cause vendor lock-in?

Cognito actually has the capability to import ...READ MORE

answered Aug 1, 2018 in AWS by bug_seeker
• 14,980 points
571 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,140 points
1,009 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,140 points
19 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,240 points
689 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.