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

Detail Codes

SM_enoent

SM_invalid_arg_value

SM_invalid_path_variable

SM_invalid_query_param

SM_malformed_url

SM_missing_arg

SM_no_action_found

SM_no_method_for_URL_pattern

SM_no_operation_found

SM_no_path_found

SM_unexpected_arg

SM_unexpected_child

SM_unexpected_query_param

SM_version_name

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"
}
]}}