POST – Create a new account
Behavior
Make sure the ServiceEnabled property in AccountService is true for creating an account.
If the ServiceEnabled property in AccountService is false, please use PATCH on AccountService to change ServiceEnabled to true.
The maximum limit for accounts is 14.
In order to follow the IPMI maximum account number, the maximum count of a Redfish account is 14.
IPMI maximum account ID is 15, but ID 1 is reserved for the Anonymous account which would not sync to Redfish.
Redfish HOSTOS and HOSTFW accounts would not be counted in the 14 accounts mentioned above.
While creating a new redfish account using post operation, the user can explicitly set the "PasswordChangeRequired" attribute to "true" or "false" in the post body.
If set to "true", then the password for this account must be changed before further access is allowed. If set to “false”, there is not need to reset the password for allowing access.
If "PasswordChangeRequired" is not given in the post body, then by default it is considered as "true".
“PasswordChangeRequired” validation is applicable only when the request comes through Redfish URI and it will not ask to change the password when logged through BMC Web UI using the Redfish account (if Redfish accounts and IPMI accounts synchronization are enabled).
- UserName and Password must follow the rules:
UserName only allows special characters ‘-’(hyphen), ‘_’(underscore),’@’(at sign) in UserName.
UserName must be a string of 1 to 16 alpha-numeric characters.
UserName must start with an alphabetical character.
Password must be a string of 8 to 20 characters.
NoteThe rules of "UserName" and "Password" should follow the rules of IPMI accounts to synchronize Redfish accounts and IPMI accounts. - Properties and Mandatory Properties to create an account:
Table 1. Properties and Mandatory Properties Properties which the user can configure while creating the account
Mandatory Properties Default Values
Name
UserName given in request body
Description
"Collection of Account Details"
Enabled
false
Password
Yes
UserName
Yes
RoleId
Yes
Locked
false
PasswordChangeRequired
false
Request
POST https://{{ip}}/redfish/v1/AccountService/Accounts
Content-Type: application/json
Request example
{
"Name": "Test User Account",
"Description": "Test User Account",
"Enabled": true,
"Password": "Superuser",
"UserName": "user_account",
"RoleId": "Operator",
"Locked": false
}
Response
The response status is 201 and the response body is a GET Response with the properties of the newly created Account.
For Error Responses, please refer to Error Response.