Skip to main content

PATCH – Update userid/password/role/ PasswordChangeRequired

Use the PATCH method to update properties in Account resource for Redfish service.

Request URL

PATCH https://<BMC_IPADDR>/redfish/v1/AccountService/Accounts/{1...12}

Request body

Properties to be updated are shown as bellow, all of these properties can be changed individually.

FieldTypeDescription

UserName

StringThe user name for this account.

Password

StringThe password of the account. Display null on a PATCH response.

RoleId

StringThe ID of the Role resource that configured for this account

Enabled

BooleanEnable this account or not.

PasswordChangeRequired

Boolean

Set it to true if the password for this account must be changed before further access is allowed.

Note
This setting is not available in Intel Purley-based systems.

SNMP

ObjectExpand
 

AuthenticationProtocol

StringAuthentication conforms to the authentication protocol.
 

EncryptionKey

StringThe secret authentication key for SNMPv3.
 

EncryptionProtocol

StringEncryption conforms to the encryption protocol.

Response body

The response returns same content as GET operation with updated properties.

Status code

HTTP Status CodeError Message ID
500InternalError

Example

The following example is PATCH body.

{
"UserName": "USERID",
"RoleId": "Administrator",
"PasswordChangeRequired": false
}

The following example JSON response is returned:

{
"AccountTypes": [
"Redfish"
],
"@odata.type": "#ManagerAccount.v1_4_0.ManagerAccount",
"@odata.id": "/redfish/v1/AccountService/Accounts/1",
"Password": null,
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/Administrator"
}
},
"Name": "User1",
"Enabled": true,
"Id": "1",
"Oem": {
"Lenovo": {
"SSHPublicKey": [
"",
"",
"",
""
],
"SNMPv3Settings": {
"AccessType": "Get",
"PrivacyProtocolPassword": null,
"Destination": "",
"AuthenticationProtocol": "None",
"PrivacyProtocol": "None"
},
"@odata.type": "#LenovoManagerAccount.v1_0_0.LenovoManagerAccount"
}
},
"RoleId": "Administrator",
"UserName": "USERID",
"PasswordChangeRequired": false,
"@odata.etag": "\"fab97f1216ebd001a50b81fb6d23270b\"",
"Locked": false,
"Description": "This resource is used to represent an account for the manager for a Redfish implementation."
}