Skip to content

Update User in Identity Store

0

I'm attempting to update a user's attributes in the Identity Store and I'm having an issue determining what the attribute path & value should be. If i wanted to, for example, update a users nickname, how would this be done using the JSON array below? What values would I plug in for the AttributePath & AttributeValue?

I've been folowing this document at (https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_UpdateUser.html) without any luck.

{
   "IdentityStoreId": 123456,
   "Operations": [ 
      { 
         "AttributePath": "string",
         "AttributeValue": JSON value
      }
   ],
   "UserId": 987654321
}
asked 3 years ago1K views
1 Answer
0
Accepted Answer

Hello,

UpdateUser does not support nested/targeted replace of complex or list attributes. So in this case, we’ll need to provide a List of emails. Something like:

input.json

{
    "IdentityStoreId": "d-1234567890",
    "UserId": "uid",
    "Operations": [
    {
        "AttributePath": "emails",
        "AttributeValue": [{
            "value": "testemail@gmail.com",
            "type": "work",
            "primary": true
        }]
    }
]
 }

$ aws identitystore update-user --cli-input-json file://input.json --region us-east-1

AWS
answered 3 years ago
EXPERT
reviewed a year ago
  • Can the update_user endpoint toggle the user Enabled/Disabled status somehow?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.