All Products
Search
Document Center

CloudSSO:UpdateUser

Last Updated:Mar 28, 2024

Modifies information about a user.

Operation description

You can modify FirstName, LastName, DisplayName, Email, and Description for a user. You cannot modify UserName for a user.

Note If System for Cross-domain Identity Management (SCIM) synchronization is enabled, you cannot modify the information about a user that is synchronized by using SCIM.

This topic provides an example on how to change the email address of the user whose ID is u-00q8wbq42wiltcrk**** to AliceLee@example.com.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cloudsso:UpdateUserWrite
  • User
    acs:cloudsso:{#regionId}:{#accountId}:directory/{#DirectoryId}/user/{#UserId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DirectoryIdstringYes

The ID of the directory.

d-00fc2p61****
UserIdstringYes

The ID of the user.

u-00q8wbq42wiltcrk****
NewFirstNamestringNo

The new first name of the user.

Alice
NewLastNamestringNo

The new last name of the user.

Lee
NewDisplayNamestringNo

The new display name of the user.

AliceLee
NewDescriptionstringNo

The new description of the user.

This is a user.
NewEmailstringNo

The new email address of the user.

AliceLee@example.com

Response parameters

ParameterTypeDescriptionExample
object
Userobject

The information about the user.

Statusstring

The status of the user. Valid values:

  • Enabled: The logon of the user is enabled.
  • Disabled: The logon of the user is disabled.
Enabled
UserNamestring

The name of the user.

Alice
Emailstring

The email address of the user.

AliceLee@example.com
Descriptionstring

The description of the user.

This is a user.
UserIdstring

The ID of the user.

u-00q8wbq42wiltcrk****
FirstNamestring

The first name of the user.

Alice
CreateTimestring

The time when the user was created.

2021-10-26T03:03:42Z
ProvisionTypestring

The type of the user. Valid values:

  • Manual: The user is manually created.
  • Synchronized: The user is synchronized from an external identity provider (IdP).
Manual
DisplayNamestring

The display name of the user.

Alice
UpdateTimestring

The time when the information about the user was modified.

2021-10-26T07:32:32Z
LastNamestring

The last name of the user.

Lee
RequestIdstring

The ID of the request.

F44F02EC-70D1-5E51-8E8E-FA9AC4EF952A

Examples

Sample success responses

JSONformat

{
  "User": {
    "Status": "Enabled",
    "UserName": "Alice",
    "Email": "AliceLee@example.com",
    "Description": "This is a user.",
    "UserId": "u-00q8wbq42wiltcrk****",
    "FirstName": "Alice",
    "CreateTime": "2021-10-26T03:03:42Z",
    "ProvisionType": "Manual",
    "DisplayName": "Alice",
    "UpdateTime": "2021-10-26T07:32:32Z",
    "LastName": "Lee"
  },
  "RequestId": "F44F02EC-70D1-5E51-8E8E-FA9AC4EF952A"
}

Error codes

For a list of error codes, visit the Service error codes.