View Source Auth0.Management.Roles (Auth0Api v2.2.0)

Summary

Functions

Assign one or more users to an existing user role.

Add one or more permissions to a specified user role.

Create a user role for Role-Based Access Control.

Delete a specific user role from your tenant. Once deleted, it is removed from any user who was previously assigned that role. This action cannot be undone.

Retrieve details about a specific user role specified by ID.

Retrieve detailed list of user roles created in your tenant.

Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role.

Retrieve list of users associated with a specific role.

Remove one or more permissions from a specified user role.

Modify the details of a specific user role specified by ID.

Types

@type config() :: Auth0.Config.t()
@type error() :: {:error, integer(), term()} | {:error, term()}
@type id() :: String.t()

Functions

Link to this function

assign_users(id, params, config)

View Source
@spec assign_users(id(), map(), config()) :: {:ok, String.t()} | error()

Assign one or more users to an existing user role.

see

https://auth0.com/docs/api/management/v2/roles/post-role-users

Link to this function

associate_permissions(id, params, config)

View Source
@spec associate_permissions(id(), map(), config()) :: {:ok, String.t()} | error()

Add one or more permissions to a specified user role.

see

https://auth0.com/docs/api/management/v2/roles/post-role-permission-assignment

@spec create(map(), config()) :: {:ok, map()} | error()

Create a user role for Role-Based Access Control.

see

https://auth0.com/docs/api/management/v2/roles/post-roles

@spec delete(id(), config()) :: {:ok, String.t()} | error()

Delete a specific user role from your tenant. Once deleted, it is removed from any user who was previously assigned that role. This action cannot be undone.

see

https://auth0.com/docs/api/management/v2/roles/delete-roles-by-id

@spec get(id(), config()) :: {:ok, map()} | error()

Retrieve details about a specific user role specified by ID.

see

https://auth0.com/docs/api/management/v2/roles/get-roles-by-id

@spec list(map(), config()) :: {:ok, [map()] | map()} | error()

Retrieve detailed list of user roles created in your tenant.

see

https://auth0.com/docs/api/management/v2/roles/get-roles

Link to this function

list_permissions(id, params, config)

View Source
@spec list_permissions(id(), map(), config()) :: {:ok, [map()] | map()} | error()

Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role.

see

https://auth0.com/docs/api/management/v2/roles/get-role-permission

Link to this function

list_users(id, params, config)

View Source
@spec list_users(id(), map(), config()) :: {:ok, [map()] | map()} | error()

Retrieve list of users associated with a specific role.

see

https://auth0.com/docs/api/management/v2/roles/get-role-user

Link to this function

remove_permissions(id, params, config)

View Source
@spec remove_permissions(id(), map(), config()) :: {:ok, String.t()} | error()

Remove one or more permissions from a specified user role.

see

https://auth0.com/docs/api/management/v2/roles/delete-role-permission-assignment

Link to this function

update(id, params, config)

View Source
@spec update(id(), map(), config()) :: {:ok, map()} | error()

Modify the details of a specific user role specified by ID.

see

https://auth0.com/docs/api/management/v2/roles/patch-roles-by-id