7.2

Table Of Contents
Property Description
disabled Species the Boolean ag indicating if the user is disabled.
principalId Species the principal ID of the user in username@domain format.
tenantName Species the name of tenant to which user belongs.
name Species the rst and last name concatenated.
Example: curl Command
The following example command queries the congured LDAP directory for a specic user.
curl --insecure -H "Accept:text/xml"
-H "Authorization: Bearer $token"
https://$host/identity/api/tenants/$tenantId/principals/$userId
Example: JSON Output
The following JSON output is returned based on the command input.
{
"links" : [ ],
"content" : [ {
"@type" : "User",
"firstName" : "Tony",
"lastName" : "Anteater",
"emailAddress" : "tony@example.mycompany.com",
"locked" : false,
"disabled" : false,
"principalId" : {
"domain" : "example.mycompany.com",
"name" : "susan"
},
"tenantName" : "MYCOMPANY1",
"name" : "Tony Anteater"
} ]
}
Syntax for Assigning a User to a Role
You can use the REST API identity service to assign a user to a role.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL hps://$host/identity/api/authorization/tenants/$tenantId/principals/$princi
palId/roles/roleId
$host Species the host name and fully qualied domain name or IP address of
the vRealize Automation identity server.
$token Species a valid HTTP bearer token with necessary credentials.
$tenantId Species the ID of the tenant.
$principalId Species the ID of the user in name@domain format.
$roleId Species the ID of the user role.
Programming Guide
30 VMware, Inc.