Kent Wong
Kent Wong

Reputation: 581

List all groups from AWS SSO via API?

I have a bunch of AWS SSO Groups I would like to list via the API so I can acquire the Name and GroupID. The API call ListGroups (https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_ListGroups.html) is pretty useless. It must filter on DisplayName and a value is currently required. As far as I could tell via the old AWS Forums, a wild card search and impartial searches are not allowed. I've tried them myself (impartial and wildcard) with the boto3 SDK and nope. Afterwards, I'd like to use the existing API calls to assign permissionsets to said groups.

AWS cannot be serious in that they don't have an API call to list the groups present?

Upvotes: 1

Views: 581

Answers (3)

Rodolfo
Rodolfo

Reputation: 36

https://github.com/aws/aws-sdk/issues/629

It is not working without the --filter parameter IF our IdentityStore is the IAM Identity Center default one

Upvotes: 2

Oleksadr S
Oleksadr S

Reputation: 43

Specify region where you have aws sso:

aws identitystore list-groups --identity-store-id=d-123456789 --region us-east-1

Which gives you output:

{
    "Groups": [
        {
            "GroupId": "123456789-aa-bb-cc-dd-ee",
            "DisplayName": "this-it-team",
            "IdentityStoreId": "d-123456789"
        },

Upvotes: 1

scottmont
scottmont

Reputation: 39

aws identitystore list-group --identity-store-id=d-xxxxxxxx

Upvotes: 0

Related Questions