Skip to main content
GET
https://{tenantDomain}/api/v2
/
organizations
/
{id}
/
members
/
{user_id}
/
roles
Go
package example

import (
    client "github.com/auth0/go-auth0/management/client"
    option "github.com/auth0/go-auth0/management/option"
    context "context"
    members "github.com/auth0/go-auth0/management/organizations/members"
    management "github.com/auth0/go-auth0/management"
)

func do() () {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    client.Organizations.Members.Roles.List(
        context.TODO(),
        "id",
        "user_id",
        &members.ListOrganizationMemberRolesRequestParameters{
            Page: management.Int(
                1,
            ),
            PerPage: management.Int(
                1,
            ),
            IncludeTotals: management.Bool(
                true,
            ),
        },
    )
}
[
  {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>"
  }
]

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Organization identifier.

Maximum string length: 50
user_id
string
required

ID of the user to associate roles with.

Query Parameters

page
integer

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

Required range: 0 <= x <= 1000
per_page
integer

Number of results per page. Defaults to 50.

Required range: 1 <= x <= 100
include_totals
boolean

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

Response

Roles successfully retrieved.

id
string

ID for this role.

name
string

Name of this role.

description
string

Description of this role.