- Newest
- Most votes
- Most comments
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:
-
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.
-
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.
-
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
Relevant content
asked 3 years ago
