Direct Inward Dialing: +1 408 916 9393
This API helps in creating user account in Active Directory from your application.
Request URL (JSON) Format: http://<hostname>:<port>/RestAPI/CreateUser
Request Parameters
Parameter Name | Mandatory | Description |
AuthToken | Yes | Authentication token that is generated either from the Delegation tab (Delegation > Configuration > Technician Authtokens) or from the My account tab (My Account > Active Authtokens) in the top right corner of the product. |
domainName | Yes | Domain in which the user object has to be created |
inputFormat | Yes | Details of the attributes of user accounts to be created. This attribute should be a JSONArray string and should be in the format mentioned below. [<JSONObject>, <JSONObject>, <JSONObject>]; JSONObject: The key/value pair of LDAP attributes and the values. Sample code in java: JSONArray userDetails = new JSONArray(); JSONObject json = new JSONObject(); json.put("givenName", "John"); json.put("initials", "mat"); json.put("sn", "Martin"); json.put("password", "Martin@12"); json.put("templateName", "User Creation Template"); userDetails.put(json); json = new JSONObject(); json.put("givenName", "Damien"); json.put("initials", "S"); json.put("sn", "David"); json.put("password", "Test@123"); json.put("templateName", "User Creation Template"); userDetails.put(json); Note: If the "templateName" attribute is not included in the key/value pair, the default user creation template assigned for the technician will be used. |
PRODUCT_NAME | Yes | Product name/module name from which the request is being sent; will be needed for auditing. |
Response:
The response will be a JSON array string which contains the list of JSONObjects. Each JSONObject in the list represents a user sent in the inputFormat attribute in the request. Each object will contain the following properties about the status.
Parameter Name | Description |
status | Status of the user creation operation: 'SUCCESS' on successful creation. 'SEVERE' if there is an error. |
statusMessage | Contains the message about the issues or errors that occur while performing the specified action. |
LOG_ON_NAME | Logon name of the user account created. Will be present only if the user creation operation is successful. |
USER_NAME | User name of the user account created. Will be present only if the user creation operation is successful. |
USER_PASSWORD | Password of the user account created, in plain text. Will be present only if the user creation operation is successful. |
Sample Input / Output
Request:
http://Byron:8080/RestAPI/CreateUser?domainName=admanagerplus.com&AuthToken=a70d9e6c-4167-4de4-a6a1-3b3aff50c82e&PRODUCT_NAME=MODULE_NAME&inputFormat=[{"givenName":"ByronTest", "password":"Test@123", "templateName":"User Creation Template"}]
Response:
[{"status":"SUCCESS","LOG_ON_NAME":"ByronTest","USER_NAME":"ByronTest","USER_P ASSWORD":"Test@123","statusMessage":"Successfully created the user."}]
Authorization:
When technicians send API requests, their authorization will be applied to those requests. That is, if a technician is not authorized to create user, the technician cannot create user accounts using the API either.
Technician-based user creation limit.
The total number of user accounts that can be created in a day using the create user API depends on the total number of licensed help desk technicians (HDTs).
If an API is used to create five AD users, and three of them are successfully created while two fail, it will be considered as three API calls. The maximum number of API calls that an HDT can make is 50/day, irrespective of the tasks that the HDT performs. If you have two HDT licenses, the total number of API calls that you can make is 100/day.
As the per day API call limit is not task-specific, you can perform any operation but the total number of API calls should not exceed 100. That is, an HDTcan perform a variety of operations like user creation, OU creation, password reset, etc., but the number of API calls for all the tasks put together should not exceed 100.
Note:
Reserved characters include ; / ? : @ = &
Unsafe characters include < > # % { } | \ ^ ~ [ ] ` "'