メインコンテンツへスキップ
GET
/
users
/
{id}
/
roles
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.users.roles.list("id", {
        perPage: 1,
        page: 1,
        includeTotals: true,
    });
}
main();
[
  {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>"
  }
]

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

パスパラメータ

id
string
必須

ID of the user to list roles for.

クエリパラメータ

per_page
integer

Number of results per page.

必須範囲: 1 <= x <= 100
page
integer

Page index of the results to return. First page is 0.

必須範囲: x >= 0
include_totals
boolean

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

レスポンス

Roles successfully retrieved.

id
string

ID for this role.

name
string

Name of this role.

description
string

Description of this role.