Skip to main content

Update User

Update user detail using this API, for the user's which has already been created using Create User.

Resource Informations

NameValue
Requires authentication?Yes
Rate limited?No

Request

Request headers

KeyValue
AuthorizationBearer token
Content-Typeapplication/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 NameTypeDescription
attributesListBased 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.
enabledBooleanDoes user enabled or not? true = enable & false = disable, Defaults to true.
emailVerifiedBooleanDoes emailVerified enabled or not? true = enable & false = disable, Defaults to true.
realmRolesListConfigure the realmRoles for which the actions need to be performed by the user. (Example: "admin","digitanium_admin","digitanium_user")
credentialsArray of Credential representationsUser credentials. Refer credential representation for details.
RequiredActionsList(String)List the actions which need to be performed during initial login. Refer Required Actions to know the supported actions.
usernameStringUnique username of the user
firstNameStringFirst name of user
lastNameStringLast name of user
emailStringUnique email corresponding to the user
ClientRolesListConfigure 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 NameTypeDescription
valueStringPassword data.
temporarybooleanEnable temporary, default true.
typeStringSet type as password.

Attributes Representation

Field NameTypeDescription
digitaniumUserIdDeleteBooleanWhen user already exist and set to "true", user will be deleted including all his 2fa devices. Per default false (Hidden Attribute).
digitaniumUserIdOnboardingTypeStringletter 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 NameTypeDescription
messageStringMessage explains result of the API call. Refer Response status Information for details.
statusStringThe status of the API call. Refer Response status Information for details.
subSystemIntegersubSystem 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 CodeStatusMessage
200SuccessUser updated successfully
400BAD_REQUESTUsername should not be null or empty
401UnauthorizedHTTP 401 Unauthorized
404USER_NOT_FOUNDUser does not exist