7.1

Table Of Contents
Syntax for Displaying all Roles Assigned to a User
You can use the REST API identity service to display all of the roles assigned to a user.
Input
Use the supported input parameters to control the command output.
Parameter Description
URL https://$host/identity/api/authorization/tenants/$tenantId/principals/$principalId/ro
les
$token Specifies a valid HTTP bearer token with necessary credentials.
$host Specifies the host name and fully qualified domain name or IP address of the
vRealize Automation identity server.
$tenantId Specifies the ID of the tenant.
principalId 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.
Property Description
id Specifies the role ID.
name Specifies the role name.
description Specifies the role description.
status Specifies the status of this role.
assignedPermissions Specifies the set of permissions that are implied by this role assignment.
Example: curl Command
The following example command lists all the roles that are assigned to tony@example.mycompany.com.
curl --insecure -H "Content-Type: application/json"
-H "Authorization: Bearer $token"
https://$host/identity/api/authorization/tenants/development/principals/
tony@example.mycompany.com/roles
Example: JSON Output
The following JSON output is returned based on the command input.
{
"links" : [ ],
"content" : [ {
"@type" : "SystemRole",
"id" : "ABX_TENANT_ADMIN",
Programming Guide
VMware, Inc. 36