Direct Inward Dialing: +1 408 916 9393
This API helps in removing computer objects from Active Directory groups from your application.
Request URL format: http://<hostname>:<port>/RestAPI/RemoveComputersFromGroup
Request parameters:
Parameter name | Mandatory | Description |
PRODUCT_NAME | Yes | Product name or module name from which the request is being sent; will be needed for auditing. |
AuthToken | Yes | Authentication token obtained using the Generate AuthToken API. |
domainName | Yes | Name of the domain in which the computer accounts are present. |
inputFormat | Yes | Details of each computer account to be modified. This attribute should be a JSONArray string and must be in the format mentioned below: [<JSONObject>, <JSONObject>, <JSONObject>];
JSONObject: The key/value pair of LDAP attributes and the values.
NOTE: You can specify any of the following attributes as search criteria to locate computer objects using REST API requests:
|
isRemoveFromAllGroup | Yes | Remove all the existing memberships of the specific computer. The value of this parameter can be set to True or False based on the requirements. |
removeGroup | No | List of all sAMAccountName of the groups. |
objectType | No | To set the object type to computer. |
Response:
The response will be a JSON array string which contains the list of JSONObjects.
Parameter name | Description |
sAMAccountName | sAMAccountName of the computer. |
objectGUID | objectGUID of the computer. |
objectSID | objectSID of the computer. |
userPrincipalName | Name of the computer. |
ouName | Name of the container where the computer to be removed is located. |
statusMessage | Contains the appropriate message if an issue or error occurs while processing the request. |
status | Contains 1 or 0, indicating whether the operation is a success or failure. |
Sample input/output:
Request
http://admanager:8080/RestAPI/RemoveComputersFromGroup?PRODUCT_NAME=MODULE&AuthToken=3187f9d3-da6b-4bc2-aaff-a73495753b8d&domainName=test.com&inputFormat=[{sAMAccountName:Test-Computer-1$}]&isRemoveFromAllGroup=false&removeGroup=[Computer-Group]
Response:
[ { "sAMAccountName": "Test-Computer-1$", "objectGUID": "{AF4A2A32-374C-4D74-A18A-DAE86AD45DBB}", "objectSID": "S-1-5-21-2058198098-2931619084-4035890149-8429", "userPrincipalName": "Test-Computer-1", "ouName": "OU=Computer,DC=test,DC=com", "statusMessage": "Successfully modified.", "status": "1" } ]