Skip to content
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 configure sso - filtering account list #8867

Open
2 tasks
davidnortonjr-sps opened this issue Aug 14, 2024 · 3 comments
Open
2 tasks

aws configure sso - filtering account list #8867

davidnortonjr-sps opened this issue Aug 14, 2024 · 3 comments
Labels
configure feature-request A feature should be added or improved. p2 This is a standard priority issue sso wizard

Comments

@davidnortonjr-sps
Copy link

Describe the feature

When using aws configure sso, I'd like to be able to type to filter accounts.

Use Case

Some organizations have a large number of accounts and it's unusable (especially given that the accounts seem to be sorted by neither ID, or alias).

Proposed Solution

It would be great to be able to type a few characters to filter the list of visible accounts.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CLI version used

aws-cli/2.17.29

Environment details (OS name and version, etc.)

macOS 14.6.1

@davidnortonjr-sps davidnortonjr-sps added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Aug 14, 2024
@tim-finnigan tim-finnigan self-assigned this Aug 14, 2024
@tim-finnigan
Copy link
Contributor

Thanks for the feature request. You should be able to filter on users with the aws identitystore list-users command (documented here) for example:

aws identitystore list-users --identity-store-id d-12345abc --filters AttributePath=UserName,AttributeValue=test-user

Or alternatively using --query:

aws identitystore list-users --identity-store-id d-12345abc --query "Users[?UserName=='test-user']"

However the docs do note that "Filtering for a User by the UserName attribute is deprecated. Instead, use the GetUserId API action.". So you could try something like this:

aws identitystore get-user-id --cli-input-json '{  "IdentityStoreId": "d-12345abc", "AlternateIdentifier": { "UniqueAttribute": {  "AttributePath": "UserName", "AttributeValue": "test-user" } } }' 

And to describe a user:

aws identitystore describe-user --identity-store-id d-12345abc --user-id <user-id>

Does that help what you're trying to do, or could you elaborate on your use case in more detail?

@tim-finnigan tim-finnigan added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. sso p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Aug 14, 2024
@davidnortonjr-sps
Copy link
Author

@tim-finnigan I think those commands are used in a different context: once authenticated to an AWS account, to list users.

I'm talking about the aws configure sso command, which is a wizard for selecting an AWS account to authenticate to. It is a command that is intended to ease configuration, and the feature request is intended to make it more usable when a user has access to a large number of AWS accounts (e.g., I have access to 336 accounts, and it is very difficult to find the account I want to auth to).

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Aug 15, 2024
@tim-finnigan
Copy link
Contributor

Thanks for clarifying — you could try using sso list-accounts or organizations list-accounts to search/filter on available accounts. I'll label this as a feature request for improving the configure wizard. Others can +1 this feature request by adding a 👍 to your original issue post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configure feature-request A feature should be added or improved. p2 This is a standard priority issue sso wizard
Projects
None yet
Development

No branches or pull requests

2 participants