TypeScript
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.organizations.groups.roles.list("organization_id", "group_id", {
from: "from",
take: 1,
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.organizations.groups.roles.list("organization_id", "group_id", {
from: "from",
take: 1,
});
}
main();
package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.ListOrganizationGroupRolesRequestParameters{
From: management.String(
"from",
),
Take: management.Int(
1,
),
}
mgmt.Organizations.Groups.Roles.List(
context.TODO(),
"organization_id",
"group_id",
request,
)
}
# Ensure you're logged in: auth0 login
auth0 api get "organizations/organization_id/groups/group_id/roles" --query "from=from" --query "take=1"using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Organizations.Groups;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.Organizations.Groups.Roles.ListAsync(
organizationId: "organization_id",
groupId: "group_id",
request: new ListOrganizationGroupRolesRequestParameters {
From = "from",
Take = 1
}
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.organizations.groups.types.ListOrganizationGroupRolesRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.organizations().groups().roles().list(
"organization_id",
"group_id",
ListOrganizationGroupRolesRequestParameters
.builder()
.from("from")
.take(1)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Organizations\Groups\Roles\Requests\ListOrganizationGroupRolesRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->organizations->groups->roles->list(
'organization_id',
'group_id',
new ListOrganizationGroupRolesRequestParameters([
'from' => 'from',
'take' => 1,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.organizations.groups.roles.list(
organization_id="organization_id",
group_id="group_id",
from_="from",
take=1,
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.organizations.groups.roles.list(
organization_id: "organization_id",
group_id: "group_id",
from: "from",
take: 1
)
curl --request GET \
--url https://{tenantDomain}/api/v2/organizations/{organization_id}/groups/{group_id}/roles \
--header 'Authorization: Bearer <token>'{
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "tenant",
"owner_id": "<string>"
}
],
"next": "<string>"
}List the roles assigned to a group in the context of an organization.
Lists the roles assigned to the specified group in the context of an organization.
GET
https://{tenantDomain}/api/v2
/
organizations
/
{organization_id}
/
groups
/
{group_id}
/
roles
TypeScript
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.organizations.groups.roles.list("organization_id", "group_id", {
from: "from",
take: 1,
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.organizations.groups.roles.list("organization_id", "group_id", {
from: "from",
take: 1,
});
}
main();
package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.ListOrganizationGroupRolesRequestParameters{
From: management.String(
"from",
),
Take: management.Int(
1,
),
}
mgmt.Organizations.Groups.Roles.List(
context.TODO(),
"organization_id",
"group_id",
request,
)
}
# Ensure you're logged in: auth0 login
auth0 api get "organizations/organization_id/groups/group_id/roles" --query "from=from" --query "take=1"using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Organizations.Groups;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.Organizations.Groups.Roles.ListAsync(
organizationId: "organization_id",
groupId: "group_id",
request: new ListOrganizationGroupRolesRequestParameters {
From = "from",
Take = 1
}
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.organizations.groups.types.ListOrganizationGroupRolesRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.organizations().groups().roles().list(
"organization_id",
"group_id",
ListOrganizationGroupRolesRequestParameters
.builder()
.from("from")
.take(1)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Organizations\Groups\Roles\Requests\ListOrganizationGroupRolesRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->organizations->groups->roles->list(
'organization_id',
'group_id',
new ListOrganizationGroupRolesRequestParameters([
'from' => 'from',
'take' => 1,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.organizations.groups.roles.list(
organization_id="organization_id",
group_id="group_id",
from_="from",
take=1,
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.organizations.groups.roles.list(
organization_id: "organization_id",
group_id: "group_id",
from: "from",
take: 1
)
curl --request GET \
--url https://{tenantDomain}/api/v2/organizations/{organization_id}/groups/{group_id}/roles \
--header 'Authorization: Bearer <token>'{
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "tenant",
"owner_id": "<string>"
}
],
"next": "<string>"
}Authorizations
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the organization
ID of the group
Query Parameters
Optional Id from which to start selection.
Number of results per page. Defaults to 50.
Required range:
x >= 1