跳至內容

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
}
已提問 3 年前檢視次數 1008 次
1 個回答
0
已接受的答案

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
已回答 3 年前
專家
已審閱 2 年前
  • Can the update_user endpoint toggle the user Enabled/Disabled status somehow?

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

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