-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws sso list-accounts --access-token "${access_token}" doesn't show accounts that are assigned via a Group #8837
Comments
Thanks for reaching out. The CLI list-accounts command makes a call to the ListAccounts API. Therefore requests to change the API response would need to get rerouted to the service team. But in this case I wonder if one of the |
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one. |
Under
but this command doesn't list all AWS accounts assigned to a user. It fails to list accounts assigned to the user via the user's group. This is definitely a bug that still needs to be fixed... I looked at the identitystore commands and none of them outputs accounts. I need a list of accounts that a user has access to... Will you please re-open this issue? |
Is the You can specify |
I don't think that one will work. It seems to need higher privileges to run, and I want regular users to be able to show the list of accounts that they have access to.
|
Thanks for following up. We heard back from the Identity Center team regarding this issue, and they noted that currently Identity Center will cache group memberships for up to 1 hour, so adding users to a group will not immediately grant access to permission sets/applications, unless the user logs out/back in. The Identity Center team plans to remove this cache restriction in the future so that logging out/in again won't be necessary. |
Oh... hey... yeah, look at that. The test I created this morning is working now! I'm closing this issue. I'll make a note in my documentation to have people wait and/or re-authenticate to get group-based access to work correctly. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Hi @tim-finnigan, I am in the process of setting up a temporary access system managed through group membership in our IDP and are starting to see this behavior, I wanted to see if there were any updates w.r.t. this caching / new workarounds |
Describe the bug
aws sso list-accounts --access-token "${access_token}"
doesn't show accounts that are assigned via a Group. It only shows accounts that are assigned via a User. For example, if IAM Identity Center user "evans" is part of the "admins" group, and the "prod" AWS account has the "admins" group assigned to it with permission set "AdministratorAccess", this command won't show the "prod" account.Expected Behavior
aws sso list-accounts --access-token "${access_token}"
should show all accounts that the user is assigned to, whether the assignment is via User or Group.Current Behavior
aws sso list-accounts --access-token "${access_token}"
only shows accounts that have the User assigned to them. If you put the User in a Group, and then assign the Group to an account, that account won't show up in the output of this command.Reproduction Steps
Add an IAM Identity Center User to a Group. Assign the Group to an AWS account with a permission set. Run
aws sso list-accounts --access-token "${access_token}"
. Note that the AWS account that the user has access to via a group does not show up in the output.Possible Solution
No response
Additional Information/Context
No response
CLI version used
aws-cli/2.17.19 Python/3.12.4 Linux/6.10.2-arch1-1 source/x86_64.arch
Environment details (OS name and version, etc.)
I use Arch BTW, hehe. aws-cli/2.17.19 Python/3.12.4 Linux/6.10.2-arch1-1 source/x86_64.arch
The text was updated successfully, but these errors were encountered: