Get List of Roles

Use this API to retrieve a list of system or custom roles in the tenant. The response includes only roles that the user has permission to view.

Query Params
string
enum

The source type of roles to return: System or Custom (case-insensitive). When omitted, both are returned. Combined with filters as AND.

Allowed:
int32
≥ 0
Defaults to 0

The zero-based page number to return. For example, page=1 returns the second page.

int32
1 to 2000
Defaults to 20

The number of roles to return per page, from 1 to 2000.

string
enum
Defaults to name,asc

The sort order, in the format property(,asc|desc). The default is name,asc, and the direction is ascending when omitted. Repeat the parameter to sort by more than one property; the orders are applied in sequence. When sorting by createdDate or lastModifiedDate, roles without a value (System roles) are always returned last, in both ascending and descending order. Ties are ordered by name, then id, so pages are stable across requests.

string
length ≤ 1000

The filter expression for roles, at most 1000 characters. Combine conditions with ; (AND). Supported: name with ==, !==, ==, !=, =sw=, =ew=; createdDate and lastModifiedDate with =gt=, =gte=, =lt=, =lte=. !== means not equal and != means does not match. For == and !~= supply % as the wildcard (e.g. %Vendor%); without % the match is exact. =sw= and =ew= always mean starts with and ends with: the trailing or leading % is optional (name=sw=Admin and name=sw=Admin% give the same result). Name matching is case-insensitive. Dates are ISO-8601 in UTC (2025-01-01T00:00:00Z) or a date (2025-01-01, read as midnight UTC); System roles have no dates and never match a date condition. OR (,), a standalone NOT (!) and parentheses are not supported. Values must not contain , ; ! ( ) ^ [ ] — filter by a part of the name without them instead, or fetch the whole list. To get a single role by its id, use GET /api/access/v3/roles/{roleId}.

Responses

400

Returned when filters, source or sort is not valid, for example an unsupported attribute, operator or character, or a filters value longer than 1000 characters.

401

Unauthorized - Invalid or missing authentication

403

Forbidden - Insufficient permissions

500

Internal Server Error

Language
Credentials
OAuth2
Missing 1 required scope
URL
LoadingLoading…
Response
Choose an example:
application/json
*/*