Syntax for Searching LDAP or Active Directory for a User
GET /api/tenants/{tenantId}/principals/{userId} searches the configured LDAP directory, Active Directory, or Native Active Directory for a user.
Input
Use the supported input parameters to control the command output.
Parameter | Description |
---|---|
URL | https://$vRA/identity/api/tenants/$tenantId/principals/$userId |
$vRA |
Specifies the appliance name and fully qualified domain name, or IP address of the vRealize Automation server. |
$token |
Specifies a valid HTTP bearer token with necessary credentials. |
$tenantId |
Specifies the ID of the tenant. |
$userId | Specifies the ID of the user in the form name@domain. |
Output
The command output contains property names and values based on the command input parameters.
Parameter | Description | ||
---|---|---|---|
Links |
Specifies an array of link objects, each of which contains the following parts:
|
||
@type | Specifies the user name. | ||
firstName | Specifies the first name of the user. | ||
lastName | Specifies the last name of the user. | ||
description | Specifies the description of the user. | ||
emailAddress | Specifies the email address of the user. | ||
locked | Specifies the Boolean flag indicating if the user is locked out. | ||
disabled | Specifies the Boolean flag indicating if the user is disabled. | ||
principalId | Specifies the principal ID of the user in username@domain format. | ||
tenantName | Specifies the name of tenant to which user belongs. | ||
name | Specifies the first and last name concatenated. |
curl Command to Search LDAP or Active Directory for a User
curl --insecure -H "Accept:text/xml" -H "Authorization: Bearer $token" https://$vRA/identity/api/tenants/$tenantId/principals/$userId
The following JSON output is returned based on the command input.
{ "links" : [ ], "content" : [ { "@type" : "User", "firstName" : "Tony", "lastName" : "Anteater", "emailAddress" : "[email protected]", "locked" : false, "disabled" : false, "principalId" : { "domain" : "example.mycompany.com", "name" : "susan" }, "tenantName" : "MYCOMPANY1", "name" : "Tony Anteater" } ] }