Skip to content

Get effective roles for a user (direct + inherited from groups)

GET
/v1/users/{id}/effective-roles
curl --request GET \
--url https://example.com/v1/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/effective-roles \
--header 'Authorization: Bearer <token>' \
--header 'X-Tenant-ID: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0'
id
required
string format: uuid
X-Tenant-ID
required
string format: uuid

Tenant identifier. Must match the tenant associated with the credential. Returns 403 tenant_mismatch if the credential and header belong to different tenants.

OK

Media type application/json
object
direct_roles
required
Array<string>
inherited_roles
required
Array<string>
effective_roles
required
Array<string>
groups
Array<object>
object
group_id
required
string format: uuid
group_name
required
string
roles
required
Array<string>
Example generated
{
"direct_roles": [
"example"
],
"inherited_roles": [
"example"
],
"effective_roles": [
"example"
],
"groups": [
{
"group_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"group_name": "example",
"roles": [
"example"
]
}
]
}

Unauthenticated

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}

Forbidden

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}

User not found

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}