POST api/account

Adds a new user account to the Azure AD.

Request Information

URI Parameters

None.

Body Parameters

AddAccountDTO
NameDescriptionTypeAdditional information
Username

Username should be of the form "name.surname". If there is a collision with an existing username, append a number, e.g. "name.username2", "name.username3" and so on. The default domain is "cpp.hr." Other verified domains in the AD directory can be used as well, in which case the username should be of the form "name.surname@domain".

string

None.

Email

User's email that the temporary password will be sent to.

string

None.

GoogleLoginEmails

Comma-separated list of Google e-mail addresses that can be used for the login. Each address has to be unique system-wide.

string

None.

Name

User's name. Optional.

string

None.

Surname

User's surname. Optional.

string

None.

Status

User's account status. Can be: Enabled, Disabled, Expired, NotPaid.

string

None.

Role

User's role within the organization. Can be: SystemAdmin, OrganizationAdmin, User, LightUser.

string

None.

DepartmentId

Department ID that the user is restricted to. If 0, the user has no restrictions.

integer

None.

AccountId

Set (when fetching) or the desired (when setting) account ID. It is useful when adding legacy users that need to have the specified user ID to have that value explicitly set. In such cases, it must not conflict with existing account IDs. Must be below 5000.

integer

None.

TranslationLanguage

User's preferred UI language. Croatian by default.

TranslationLanguage

None.

Request Formats

application/json, text/json

Sample:
{
  "Username": "sample string 1",
  "Email": "sample string 2",
  "GoogleLoginEmails": "sample string 3",
  "Name": "sample string 4",
  "Surname": "sample string 5",
  "Status": "sample string 6",
  "Role": "sample string 7",
  "DepartmentId": 8,
  "AccountId": 9,
  "TranslationLanguage": 0
}

text/html

Sample:
{"Username":"sample string 1","Email":"sample string 2","GoogleLoginEmails":"sample string 3","Name":"sample string 4","Surname":"sample string 5","Status":"sample string 6","Role":"sample string 7","DepartmentId":8,"AccountId":9,"TranslationLanguage":0}

application/xml, text/xml

Sample:
<AddAccountDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Common.WebAPI.DTOs">
  <AccountId>9</AccountId>
  <DepartmentId>8</DepartmentId>
  <Email>sample string 2</Email>
  <GoogleLoginEmails>sample string 3</GoogleLoginEmails>
  <Name>sample string 4</Name>
  <Role>sample string 7</Role>
  <Status>sample string 6</Status>
  <Surname>sample string 5</Surname>
  <TranslationLanguage>Croatian</TranslationLanguage>
  <Username>sample string 1</Username>
</AddAccountDTO>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'AddAccountDTO'.

Response Information

Resource Description

AddAccountDTO
NameDescriptionTypeAdditional information
Username

Username should be of the form "name.surname". If there is a collision with an existing username, append a number, e.g. "name.username2", "name.username3" and so on. The default domain is "cpp.hr." Other verified domains in the AD directory can be used as well, in which case the username should be of the form "name.surname@domain".

string

None.

Email

User's email that the temporary password will be sent to.

string

None.

GoogleLoginEmails

Comma-separated list of Google e-mail addresses that can be used for the login. Each address has to be unique system-wide.

string

None.

Name

User's name. Optional.

string

None.

Surname

User's surname. Optional.

string

None.

Status

User's account status. Can be: Enabled, Disabled, Expired, NotPaid.

string

None.

Role

User's role within the organization. Can be: SystemAdmin, OrganizationAdmin, User, LightUser.

string

None.

DepartmentId

Department ID that the user is restricted to. If 0, the user has no restrictions.

integer

None.

AccountId

Set (when fetching) or the desired (when setting) account ID. It is useful when adding legacy users that need to have the specified user ID to have that value explicitly set. In such cases, it must not conflict with existing account IDs. Must be below 5000.

integer

None.

TranslationLanguage

User's preferred UI language. Croatian by default.

TranslationLanguage

None.

Response Formats

application/json, text/json

Sample:
{
  "Username": "sample string 1",
  "Email": "sample string 2",
  "GoogleLoginEmails": "sample string 3",
  "Name": "sample string 4",
  "Surname": "sample string 5",
  "Status": "sample string 6",
  "Role": "sample string 7",
  "DepartmentId": 8,
  "AccountId": 9,
  "TranslationLanguage": 0
}

text/html

Sample:
{"Username":"sample string 1","Email":"sample string 2","GoogleLoginEmails":"sample string 3","Name":"sample string 4","Surname":"sample string 5","Status":"sample string 6","Role":"sample string 7","DepartmentId":8,"AccountId":9,"TranslationLanguage":0}

application/xml, text/xml

Sample:
<AddAccountDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Common.WebAPI.DTOs">
  <AccountId>9</AccountId>
  <DepartmentId>8</DepartmentId>
  <Email>sample string 2</Email>
  <GoogleLoginEmails>sample string 3</GoogleLoginEmails>
  <Name>sample string 4</Name>
  <Role>sample string 7</Role>
  <Status>sample string 6</Status>
  <Surname>sample string 5</Surname>
  <TranslationLanguage>Croatian</TranslationLanguage>
  <Username>sample string 1</Username>
</AddAccountDTO>