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 ?

3 réponses
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
répondu il y a 5 mois
0
Réponse acceptée

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
EXPERT
répondu il y a 5 mois
profile picture
EXPERT
vérifié il y a 5 mois
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?

répondu il y a 2 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions