Skip to content

API or CLI for "Disable user" in IAM Identity Center is not available yet?

1

Hi all

I can see that "Disable user" in IAM Identity Center is available on the console - https://docs.aws.amazon.com/singlesignon/latest/userguide/disableuser.html. But it does not say anything about API or CLI support. API or CLI for "Disable user" in IAM Identity Center is not available?

I found an answer but it's 2 years ago - https://repost.aws/questions/QUct63rxIsT_CXkQmOOHFKmA/disable-aws-identity-center-users.

Thanks.

asked 2 years ago619 views

1 Answer
0
Accepted Answer

You are correct that the "Disable user" functionality in IAM Identity Center is available through the console, but as of now, there is no direct API or CLI command to disable a user in IAM Identity Center.

The Identity Store API, which is part of IAM Identity Center, does not currently offer a specific method to disable a user. The available operations for managing users are limited to creating, updating, deleting, and describing users, but do not include a disable function.

However, there are workarounds to effectively revoke access for users who need to be disabled:

  1. You can update the inline policy of the permission sets assigned to the user by adding an explicit "Deny" effect for all actions on all resources. This can be done programmatically.

  2. You can use the user's ID or email address in a Service Control Policy (SCP) to deny access across all member accounts in your organization.

  3. For immediate revocation of access, you can delete the user's sessions, which will force them to log out and prevent them from making authorized API calls.

It's worth noting that AWS continues to add features and functionalities to their services, so while this specific API/CLI feature is not available now, it may be added in the future. If this feature is critical for your operations, you might consider submitting a feature request to AWS, especially if you have enterprise support.
Sources
missing features in identitystore api/cli | AWS re:Post
Revoke access for deleted users - AWS IAM Identity Center
Manage identities in IAM Identity Center - AWS IAM Identity Center

answered 2 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.