Update User
Update user detail using this API, for the user's which has already been created using Create User.
Resource Informations
Name | Value |
---|---|
Requires authentication? | Yes |
Rate limited? | No |
Request
Request headers
Key | Value |
---|---|
Authorization | Bearer token |
Content-Type | application/json |
HTTP request URL for SSMS
PUT https://{tenantId}.{hostname}/digitanium/v4/users/{userName}/update
HTTP request URL for SHIFT
PUT https://{hostname}/auth/realms/{tenantId}/v3_user/{userName}/update
note
API requests must be made over https. Calls made over plain http will fail.
Parameters
No parameter fields are required.
Request body (* Required)
Field Name | Type | Description |
---|---|---|
attributes | List | Based on the user requirement the user attributes can be updated. User can add any customized attribute in form of key value pair. Refer Attributes Representation for details. |
enabled | Boolean | Does user enabled or not? true = enable & false = disable, Defaults to true. |
emailVerified | Boolean | Does emailVerified enabled or not? true = enable & false = disable, Defaults to true. |
realmRoles | List | Configure the realmRoles for which the actions need to be performed by the user. (Example: "admin","digitanium_admin","digitanium_user") |
credentials | Array of Credential representations | User credentials. Refer credential representation for details. |
RequiredActions | List(String) | List the actions which need to be performed during initial login. Refer Required Actions to know the supported actions. |
username | String | Unique username of the user |
firstName | String | First name of user |
lastName | String | Last name of user |
String | Unique email corresponding to the user | |
ClientRoles | List | Configure the client roles for which the actions need to be performed by the user. Note: Using the composite role suffice in the request body, which gets all the sub roles available for it. |
note
mID Provider supports these special characters in Username $@(.)-*_[]~!&+
. Usage of any other special characters or symbols are not supported.
Credential representation
Field Name | Type | Description |
---|---|---|
value | String | Password data. |
temporary | boolean | Enable temporary, default true. |
type | String | Set type as password. |
Attributes Representation
Field Name | Type | Description |
---|---|---|
digitaniumUserIdDelete | Boolean | When user already exist and set to "true", user will be deleted including all his 2fa devices. Per default false (Hidden Attribute). |
digitaniumUserIdOnboardingType | String | letter or onscreen: letter - when user is not activated, does not have any active 2FA devices, login webpage shows instructions how to activate user.onscreen - when user is not activated, does not have any active 2FA devices, login webpage shows instructions and directly activation code. This method should only be combined with username password authentication. |
note
Hidden Attribute - Even admin won't be able to view it.
Sample Request
{
"enabled": true,
"emailVerified": true,
"requiredActions": ["VERIFY_EMAIL"],
"firstName": "first4",
"lastName": "last6",
"realmRoles": ["admin"],
"email": "test3@grootantest1.com",
"credentials": [{
"value": "123",
"temporary": false,
"type": "password",
"secretData": "achyuth"
}],
"clientRoles": {
"client_Name": ["client_role1", "client_role2", "client_role3", "client_role4"]
},
"realmRoles": ["realm_role1", "realm_role2"]
}
Response
Field Name | Type | Description |
---|---|---|
message | String | Message explains result of the API call. Refer Response status Information for details. |
status | String | The status of the API call. Refer Response status Information for details. |
subSystem | Integer | subSystem categorizes the type of API that has been called. Refer Subsystem details for details. |
Sample Response
{
"message": "User updated successfully",
"status": "Success",
"subSystem": 5
}
Response Status Information
Status Code | Status | Message |
---|---|---|
200 | Success | User updated successfully |
400 | BAD_REQUEST | Username should not be null or empty |
401 | Unauthorized | HTTP 401 Unauthorized |
404 | USER_NOT_FOUND | User does not exist |