REST API Reference Version 5.2.1.0Search

Test_user

POST v1/active_directory_memberships/id/actions/test_user

Description

Tests whether the user exist in the Active Directory. If the user is present, then the user's group and role information is reported.

Normal Response Codes

200

HTTP Error Codes

400 401 403 404 409 500 503

Request

Parameter Type JSON Type Description Mandatory
id NsObjectID string ID of the Active Directory. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'. true
name NsDomainUser string Name of the Active Directory user. Active Directory username. String up to 104 printable characters. Example: 'joe-91'. true

JSON Request

            
        {"data":{"name":"joe"}}
        
         

Response

Type: NsADTestUserReturn

Member Type JSON Type Description
username NsString string Name of the Active Directory user. Plain string.
primary_group_name NsGroupName string Name of the Active Directory group the user belongs to. RBAC is based on this primary group. String of up to 64 alphanumeric characters, - is allowed after first character. Example: 'g1-exchange'.
primary_group_id NsObjectID string Id of the Active Directory group the user belongs to. RBAC is based on this primary group. A 42 digit hexadecimal number. Example: '2a0df0fe6f7dc7bb16000000000000000000004817'.
group_count NsUnsignedLong number Number of Active Directory groups the user belongs to. Unsigned 64-bit integer. Example: 1234.
groups NsUserGroupNames array List of Active Directory groups the user belongs to. List of Active Directory groups the user belongs to.
role NsUserRoles string The role the user belongs to. Possible values: 'administrator', 'poweruser', 'operator', 'guest'.

JSON Response

            
        {"data": {"username": "joe","primary_group": "domain users","group_count": 1,"groups": [{
    "name": "domain users"
}
]}}