Organizational users can be created and assigned to subscriptions. Before a user is assigned to a subscription, the user will first have to be created and assigned a role.

API Details
| Users | |||
| Operation | Swagger Description | Method | API |
| Return a user | Returns all organization users assigned to a subscription | POST | /api/resellers/{resellerId}/organizations/{organizationId}/Users |
| Retrieve all users | Returns all organization users | GET | /api/resellers/{resellerId}/organizations/{organizationId}/Users |
| Update a user | Returns user details | GET | /api/resellers/{resellerId}/organizations/{organizationId}/Users/{id} |
| Delete a user | Updates organization user | PUT | /api/resellers/{resellerId}/organizations/{organizationId}/Users/{id} |
| Creates new users for the organization | Deletes organization user | DELETE | /api/resellers/{resellerId}/organizations/{organizationId}/Users/{id} |
| OrganizationRoles | |||
| Retrieve all organization user roles | Returns all organization user roles | GET | /api/resellers/{resellerId}/organizations/{organizationId}/OrganizationRoles |
| OrganizationSubscriptionUsers | |||
| Returns all organization users assigned to a subscription | Updates subscription external user-id | GET | /api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/subscriptions/{subscriptionId}/users |
| Updates subscription external user-id | Assign a user to a subscription. | PUT | /api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/subscriptions/{subscriptionId}/users |
| Assign a user to a subscription | Removes a user from subscription | POST | /api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/subscriptions/{subscriptionId}/users |
| Removes a user from a subscription | Removes a user from a subscription | DELETE | /api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/subscriptions/{subscriptionId}/users/{userId} |
API Examples
Retrieve Organization Roles
| Retrieve available roles | |
|---|---|
| End Point | /api/resellers/{resellerId}/organizations/{organizationId}/OrganizationRoles |
| HTTP Method | GET |
| Request Body | N/A. |
| Successful Example Response | 200[ { "id": 13, "name": "Organization Admin" }, { "id": 12, "name": "Organization Billing Admin" }, { "id": 10, "name": "Organization User" }, { "id": 11, "name": "Organization View Only Admin" } ] |
| Error Example Response | 404 |
Create the Organization User
| Create the User | |
|---|---|
| End Point | /api/resellers/{resellerId}/organizations/{organizationId}/Users |
| HTTP Method | POST |
| Request Body | { "name": "john.doe@sdtest2.com", "password": "Password123!", "firstName": "John", "lastName": "Doe", "displayName": "John Dow", "roleId": 13, "title": "Mr", "homePhone": "5678912", "homePhonePrefix": "372", "department": "Accounting", "office": "Tallinn", "company": "ABC Company", "email": "saadick.dhansay@cloudmore.com", "address": { "street": "123 Street", "postalCode": "10112", "city": "Tallinn", "countryCode": "EE" }, "mfaOption": "0", "cellPhone": "53564558", "cellPhonePrefix": "372" } |
| Successful Example Response | 201 |
| Error Example Response | 400[ { "errorCode": 9, "errorName": "ValueAlreadyInUse", "errorMessage": "User name is not available, please try again john.doe@sdtest2.com" } ]{ "Name": [ "The Name field is required." ], "RoleId": [ "The RoleId field is required." ] } |
Retrieve All Organizations Users
| Create a Service | |
|---|---|
| End Point | /api/resellers/{resellerId}/organizations/{organizationId}/Users |
| HTTP Method | GET |
| Request Body | N/A. |
| Successful Example Response | 201[ { "id": "2bd68fe8-7cc9-4a5f-b47c-992847bcd6fb", "name": "john.doe@sdtest2.com", "displayName": "John Doe", "role": { "id": 13, "name": "Organization Admin" }, "services": 0, "active": true } ] |
| Error Example Response | 404 |
Assign a User to a Subscription.
| Create the User | |
|---|---|
| End Point | /api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/subscriptions/{subscriptionId}/users |
| HTTP Method | POST |
| Request Body | { "userId": "2bd68fe8-7cc9-4a5f-b47c-992847bcd6fb", "externalUserId": "122345" } |
| Successful Example Response | 201 |
| Error Example Response | 400{ "UserId": [ "The UserId field is required." ] } |
API Field Definitions – Users
| Field | Description |
| name* | The username to be used.Must be an email address and match the domain of the organization. |
| password* | Minimum password length is eight (8) characters. Password must contain uppercase and lowercase characters, numbers and non-word characters. Password cannot contain parts of the user’s account name or parts of the user’s full name |
| firstName* | The first name of the user. |
| lastName* | The last name of the user. |
| displayName* | The display name of the user. |
| roleId* | The role to be assigned to the user All available roles can be retrieved from /api/resellers/{resellerId}/organizations/{organizationId}/OrganizationRoles |
| title | The user’s home phone number.Only accepts digits from 0 to 9. |
| homePhonePrefix | The user’s title. |
| homePhone | The department the users belong to. |
| department | The user’s office. |
| office | The user’s company. |
| company | The user’s company. |
| email* | The email address of the user. |
| syncNumber | Users synchronization number (pre Windows 2000 username) |
| azureAdId | ID in Azure Active Directory (apply only for users import from AD) |
| address* | street – Users street address name and house number postalCode – User address postal code city – Users city countryCode* – ISO 3166 Alpha-2 country code of the user address https://www.iso.org/obp/ui/#search/code/ |
| mfaOption | Determines which multi-factor authentication method a user should use during login Email = 0 (default), SMS = 1 With the SMS option, the fields CellPhonePrefix and CellPhone become mandatory and must contain valid numbers. |
| cellPhonePrefix | The users cell phone number prefix. Only accepts digits from 0 to 9. Country calling code of the phone number without the ‘+’ mark. https://en.wikipedia.org/wiki/List_of_country_calling_codes |
| cellPhone | The user’s home phone number. Only accepts digits from 0 to 9. |
API Field Definitions – OrganizationSubscriptionUsers
| Field | Description |
| userId | The identifier of the user to be assigned to the subscription. |
| externalUserId | An external identifier of the user. |