Direct Inward Dialing: +1 408 916 9393
This API helps in modifying user account in Active Directory from your application.
Request URL (JSON) Format: http:// <hostname> : <port> /RestAPI/ModifyUser
Request Parameters:
| Parameters | 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 modified |
| inputFormat | Yes | Details of the attributes of user accounts to be modified. This attribute should be a JSONArray string and should be in the format mentioned below. [>,<JSONObject>,<JSONObject>];JSONObject - key/value pair of LDAP attributes and their corresponding values Sample code in java:333?444 JSONArray userDetails = new JSONArray(); JSONObject json = new JSONObject(); json.put("sAMAccountName", "John"); json.put("manager", "Scott"); json.put("department", "Designers"); userDetails.put(json); json = new JSONObject(); json.put("sAMAccountName", "Damien"); json.put("manager", "Scott"); json.put("department", "Designers");userDetails.put(json);333?444 |
| 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.
| Parameters | Description |
| status | Status of the user modification operation: 'SUCCESS' on successful modification. 'SEVERE' if there is an error. |
| statusMessage | Contains the message about the issues or errors that occur while performing the specified action. |
| SAM ACCOUNT NAME | aAMAccountName of the user account modified. |
| USER_NAME | User name of the user account modified.333?444 |
Sample Input / Output
Request:
http://admanager:8080/RestAPI/ModifyUser?domainName=admp.local&AuthToken=244f8f17-041d-4c85-9924-02f7351a6fbb&inputFormat=[{"sAMAccountName":"John", "manager":"Scott", "department":"Designers"}, {"sAMAccountName":"Damien", "manager":"Scott", "department":"Designers"}]&PRODUCT_NAME=RESTAPI
Sample Response:
[{"USER_NAME":"John","LOG_ON_NAME":"John","statusMessage":"Successfully updated the user.","status":"SUCCESS"},{"USER_NAME":"Damien","LOG_ON_NAME":"Damien","statusMessage":"Successfully updated the user.","status":"SUCCESS"}]
Authorization:
When technicians send API requests, their authorization will be applied to those requests. That is, if a technician is not authorized to modify a user, the technician cannot modify user accounts using the API either.