how can we Edit username in IAM Identity Center (SSO)

0

I'm trying to rename the username of an existing user in the AWS IAM Identity Center ( AWS Single Sign-On). I know it's not possible to change the usernames through AWS Console because its not editable. is there any other way to rename username any cli command or api ?

已提问 5 个月前677 查看次数
3 回答
1
  • If you are using external IdP: if your external IdP supports username change via SCIM patch user, you can do it there. If it does not support it you might be able to update the IdP and IdC separately (after temporarily pause or disable SCIM) by combining the approach blow.
  • If you are using IdC's own directory. Use the following CLI (or corresponding API). Make sure that you use the right capitalization of attribute as in my example.
aws identitystore update-user --cli-input-json file://input.json --region us-east-1

input.json content:

{
    "IdentityStoreId": "d-9067a1f497",
    "UserId": "345874a8-d051-702b-261f-9a83d19287ec",
    "Operations": [
    {
      "AttributePath": "userName",
      "AttributeValue": "new-username"
    }
  ]
 }
AWS
已回答 5 个月前
0
已接受的回答

Hello.

As stated in the documentation below, the username cannot be changed later.
If you want to make changes, you will need to create a new user.
https://docs.aws.amazon.com/singlesignon/latest/userguide/addusers.html

Username – This user name is required to sign in to the AWS access portal and can't be changed later. It must be between 1 and 100 characters.

profile picture
专家
已回答 5 个月前
profile picture
专家
已审核 5 个月前
0

I did not uderstand what are the values for AttrributePath and ValuePath, because I had this error in AWS CLI with the command above: "An error occurred (ValidationException) when calling the UpdateUser operation: 1 validation error detected: Value X' at 'operations.1.member.attributePath' failed to satisfy constraint: Member must satisfy regular expression pattern: \p{L}+(?:.\p{L}+){0,2}" I am not familiar with regex and I don't know how to pass the old username and the new username.

Can you help me?

已回答 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则