Code Monkey home page Code Monkey logo

Comments (3)

davidnortonjr-sps avatar davidnortonjr-sps commented on August 29, 2024 1

@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).

from aws-cli.

tim-finnigan avatar tim-finnigan commented on August 29, 2024

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?

from aws-cli.

tim-finnigan avatar tim-finnigan commented on August 29, 2024

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.

from aws-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.