User Accounts ​
POST /winapi/useraccount
Adding User Accounts, either Active Directory or Local Accounts, via the API can be achieved by making a POST request on the URL, with appropriate fields forming the HTTP message body. You must have the 'User Accounts' Security Administrators role in Passwordstate to execute this call.
Below are a list of all possible fields which can be included in your POST request, explaining which ones are mandatory, and detailed instructions for each field as appropriate.
| Heading | Data Type | Mandatory | Description |
|---|---|---|---|
| UserID | String (100) | Yes | A unique value which represents the user's account. If the account being added is an Active Directory account, then this would be the sAMAccountName attribute for the account in AD. If the account is for a local account, then this value can be any value you like, as long as it is unique |
| FirstName | String (50) | No | First name for the user |
| Surname | String (50) | No | Surname for the user |
| EmailAddress | String (100) | No | Email Address for the user |
| Password | String (NA) | Yes or No | This is the authenticating password for the user account. This field is not required for Active Directory accounts |
| Department | String (300) | No | What department the user belongs to |
| Office | String (300) | No | What office the user belongs to |
| UserPrincipalName | String (100) | No | The field generally matches the EmailAddress for the user |
| SiteID | Integer | No | If left blank, SiteID of 0 would be used which represents the site of 'Internal' you see within Passwordstate. SiteID's are normally only required if you use the Remote Site Locations module in Passwordstate |