Skip to content

[IAM] Programmatically list all users with console access enabled

0

ListUsers only contains 'PasswordLastUsed' which isn't suitable to use for this purpose.

asked 4 years ago2.2K views
2 Answers
1
Accepted Answer

A login profile is required for console access, so any IAM user with a login profile has access to the console.

So, using the CLI or API that fits your use case:

  1. list-users
  2. for each user
  3. get-login-profile --user-name <user>
  4. If no login profile then they do not have console access.
AWS
answered 4 years ago
EXPERT
reviewed 2 years ago
EXPERT
reviewed 2 years ago
0

You can find this information in a Credentials Report. See: Getting credential reports for your AWS account. You will need to parse the report but the data you are looking for is in there.

AWS
EXPERT
answered 4 years ago
EXPERT
reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.