Skip To Content
ArcGIS Developers
Dashboard

Get Roles For User

Description

This operation returns a list of role names that have been assigned to a particular user account. This operation is used by the authorization module in ArcGIS Server to determine the collective privileges of a requesting user account.

Request parameters

ParameterDescription
username

The name of the user for whom to return the roles.

Example

username=jwhite
filter

(Optional)

A filter to be applied to the resultant role set.

maxCount

The maximum number of results to return for this query.

Example

maxCount=20
f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

Below is a sample POST request for getRolesForUser that demonstrates how to get all the roles that have been assigned to user 'jwhite':

POST /webadaptor/admin/security/roles/getRolesForUser HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

username=jwhite&filter=&maxCount=20&f=json

JSON Response syntax

{
  "roles": ["<role1>", "<role2>"],
  "hasMore": <true|false>
}