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 個月前檢視次數 675 次
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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南