- Newest
- Most votes
- Most comments
The error you're encountering is due to an incorrect configuration in your Systems Manager Automation document. The issue lies in the specification of the AWS service and API name in the aws:executeAwsApi
action.
For AWS Identity Center (formerly known as AWS SSO) operations, you need to use the Identity Store API, which is a separate service from the main SSO service. The correct service name to use is "identitystore", not "sso".
Additionally, the UpdateUser
API in the Identity Store service doesn't directly support disabling a user by setting an "active" attribute to false. Instead, you would typically update the user's status using a different approach.
To resolve this issue, you should modify your Automation document as follows:
- Change the
Service
parameter from "sso" to "identitystore". - Instead of using
UpdateUser
, use the appropriate API call to update the user's status. The exact API may depend on how user statuses are managed in your Identity Center configuration.
Here's an example of how you might modify the DisableUser
step:
- name: DisableUser action: aws:executeAwsApi isEnd: true inputs: Service: identitystore Api: UpdateUser IdentityStoreId: '{{ IdentityStoreId }}' UserId: '{{ UserId }}' UserName: '{{ UserName }}' Status: DISABLED
Note that this is a conceptual example, and the exact parameters and values may need to be adjusted based on the specific API requirements and your Identity Center configuration.
Also, ensure that the IAM role specified in AutomationAssumeRole
has the necessary permissions to perform operations on the Identity Store service.
If you continue to face issues, you may need to consult the AWS Identity Store API documentation for the most up-to-date information on managing user statuses, or consider using AWS CLI or SDK commands within a aws:executeScript
action for more complex operations.
Sources
UpdateUser - AWS Identity and Access Management
Using action outputs as inputs - AWS Systems Manager
Relevant content
- asked 2 years ago
- asked 10 months ago