POST
/v1/mgmt/role/search

Authorization

Descope Project ID and Management Key
AuthorizationBearer <token>

Project ID:Management Key as bearer token.

In: header

Request Body

application/json

tenantIds?array<string>
string
roleNames?array<string>
string
roleNameLike?string
permissionNames?array<string>
string
text?string

Full text search across relevant columns

sort?array<SortField>
includeProjectRoles?boolean

relevant when tenantIds are set

Search roles, using a valid management key.

This API endpoint allows administrators to search against existing roles.

This endpoint returns an array of roles including their name, description, and permissionsNames that match the search parameters.

See also

curl -X POST "https://api.descope.com/v1/mgmt/role/search" \  -H "Content-Type: application/json" \  -d '{}'
{  "roles": [    {      "name": "string",      "description": "string",      "permissionNames": [        "string"      ],      "createdTime": 0,      "tenantId": "string",      "default": true,      "private": true    }  ]}
export interface Response {roles?: {name?: stringdescription?: stringpermissionNames?: string[]createdTime?: numbertenantId?: stringdefault?: booleanprivate?: boolean}[]}
Was this helpful?