View Source Auth0.Management.Organizations (Auth0Api v2.5.1)

Facade for the Auth0 Management API Organizations endpoints.

Most applications should call Auth0.Api.Management instead of this module.

Summary

Functions

Enable a specific connection for a given Organization. To enable a connection, it must already exist within your tenant; connections cannot be created through this action.

Set one or more existing users as members of a specific Organization.

Assign roles to a group in an organization context.

Assign one or more roles to a user to determine their access for a specific Organization.

Create a new Organization within your tenant.

Add a connection to an organization.

Associate a client grant with an organization.

Associate clients with an organization.

Create an organization discovery domain.

Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization.

Remove an Organization from your tenant. This action cannot be undone.

Delete a connection from an organization.

Remove a client grant from an organization.

Remove client associations from an organization.

Disable a specific connection for an Organization. Once disabled, Organization members can no longer use that connection to authenticate.

Delete an organization discovery domain.

Delete an invitation to an Organization

Delete members from an organization

Remove one or more Organization-specific roles from a given user.

Retrieve details about a single Organization specified by ID.

Get a specific connection associated with an organization.

Retrieve details about a single Organization specified by name.

Get an organization client association.

Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login.

Retrieve an organization discovery domain by ID.

Retrieve an organization discovery domain by domain name.

Get a specific invitation to an Organization

Retrive detailed list of all Organizations available in your tenant.

Get connections associated with an organization.

Get client grants associated to an organization.

List organization client associations.

Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login.

Retrieve all organization discovery domains.

List the roles assigned to a group in the context of an organization.

List the groups that are assigned to the organization.

Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration.

List organization member role group sources.

List organization member effective roles.

List organization members.

List the groups assigned to a role in the context of an organization.

List the members assigned to a role in the context of an organization.

Retrieve detailed list of roles assigned to a given user within the context of a specific Organization.

Update the details of a specific Organization, such as name and display name, branding options, and metadata.

Modify the details of a specific connection currently enabled for an Organization.

Remove roles assigned to a group in an organization context.

Search organizations.

Update a connection for an organization.

Update an organization client association.

Update an organization discovery domain.

Types

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

Functions

Link to this function

add_connection(id, params, config)

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

Enable a specific connection for a given Organization. To enable a connection, it must already exist within your tenant; connections cannot be created through this action.

see

https://auth0.com/docs/api/management/v2/organizations/post-enabled-connections

Link to this function

add_members(id, params, config)

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

Set one or more existing users as members of a specific Organization.

see

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

Link to this function

assign_group_roles(organization_id, group_id, params, config)

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

Assign roles to a group in an organization context.

Assign one or more roles to a specified group in the context of an organization.

see

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

Link to this function

assign_roles(id, user_id, params, config)

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

Assign one or more roles to a user to determine their access for a specific Organization.

see

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

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

Create a new Organization within your tenant.

see

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

Link to this function

create_associated_connection(id, params, config)

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

Add a connection to an organization.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/organizations/post-organization-connection

Link to this function

create_client_grant(id, params, config)

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

Associate a client grant with an organization.

see

https://auth0.com/docs/api/management/v2/organizations/create-organization-client-grants

Link to this function

create_clients(id, params, config)

View Source
@spec create_clients(String.t(), map(), config()) :: {:ok, [map()]} | error()

Associate clients with an organization.

Associate one or more clients with an organization.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/organizations/post-organization-clients

Link to this function

create_discovery_domain(id, params, config)

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

Create an organization discovery domain.

Create a new discovery domain for an organization.

see

https://auth0.com/docs/api/management/v2/organizations/post-discovery-domains

Link to this function

create_invitation(id, params, config, opts \\ [])

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

Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization.

see

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

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

Remove an Organization from your tenant. This action cannot be undone.

see

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

Link to this function

delete_associated_connection(id, connection_id, config)

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

Delete a connection from an organization.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/organizations/delete-organization-connection

Link to this function

delete_client_grant(id, grant_id, config)

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

Remove a client grant from an organization.

see

https://auth0.com/docs/api/management/v2/organizations/delete-client-grants-by-grant-id

Link to this function

delete_clients(id, params, config)

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

Remove client associations from an organization.

Remove one or more client associations from an organization.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/organizations/delete-organization-clients

Link to this function

delete_connection(id, connection_id, config)

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

Disable a specific connection for an Organization. Once disabled, Organization members can no longer use that connection to authenticate.

see

https://auth0.com/docs/api/management/v2/organizations/delete-enabled-connections-by-connection-id

Link to this function

delete_discovery_domain(id, discovery_domain_id, config)

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

Delete an organization discovery domain.

Remove a discovery domain from an organization. This action cannot be undone.

see

https://auth0.com/docs/api/management/v2/organizations/delete-discovery-domains-by-discovery-domain-id

Link to this function

delete_invitation(id, invitation_id, config)

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

Delete an invitation to an Organization

see

https://auth0.com/docs/api/management/v2/organizations/delete-invitations-by-invitation-id

Link to this function

delete_members(id, params, config)

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

Delete members from an organization

see

https://auth0.com/docs/api/management/v2/organizations/delete-members

Link to this function

delete_roles(id, user_id, params, config)

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

Remove one or more Organization-specific roles from a given user.

see

https://auth0.com/docs/api/management/v2/organizations/delete-organization-member-roles

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

Retrieve details about a single Organization specified by ID.

see

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

Link to this function

get_associated_connection(id, connection_id, config)

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

Get a specific connection associated with an organization.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/organizations/get-organization-connection

Link to this function

get_by_name(name, config)

View Source
@spec get_by_name(name(), config()) :: {:ok, map()} | error()

Retrieve details about a single Organization specified by name.

see

https://auth0.com/docs/api/management/v2/organizations/get-name-by-name

Link to this function

get_client(id, client_id, config)

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

Get an organization client association.

Get a specific client association for an organization.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/organizations/get-organization-client

Link to this function

get_connection(id, connection_id, config)

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

Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login.

see

https://auth0.com/docs/api/management/v2/organizations/get-enabled-connections-by-connection-id

Link to this function

get_discovery_domain(id, discovery_domain_id, config)

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

Retrieve an organization discovery domain by ID.

Retrieve details about a single organization discovery domain specified by ID. This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response.

see

https://auth0.com/docs/api/management/v2/organizations/get-discovery-domains-by-discovery-domain-id

Link to this function

get_discovery_domain_by_name(id, discovery_domain, config)

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

Retrieve an organization discovery domain by domain name.

Retrieve details about a single organization discovery domain specified by domain name. This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response.

see

https://auth0.com/docs/api/management/v2/organizations/get-name-by-discovery-domain

Link to this function

get_invitation(id, invitation_id, params, config)

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

Get a specific invitation to an Organization

see

https://auth0.com/docs/api/management/v2/organizations/get-invitations-by-invitation-id

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

Retrive detailed list of all Organizations available in your tenant.

see

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

Link to this function

list_associated_connections(id, params, config)

View Source
@spec list_associated_connections(String.t(), map(), config()) ::
  {:ok, map() | [map()]} | error()

Get connections associated with an organization.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/organizations/get-organization-connections

Link to this function

list_client_grants(id, params, config)

View Source
@spec list_client_grants(String.t(), map(), config()) ::
  {:ok, map() | [map()]} | error()

Get client grants associated to an organization.

see

https://auth0.com/docs/api/management/v2/organizations/get-organization-client-grants

Link to this function

list_clients(id, params, config)

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

List organization client associations.

List all clients associated with an organization, using checkpoint pagination. Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/organizations/get-organization-clients

Link to this function

list_connections(id, params, config)

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

Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login.

see

https://auth0.com/docs/api/management/v2/organizations/get-enabled-connections

Link to this function

list_discovery_domains(id, params, config)

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

Retrieve all organization discovery domains.

Retrieve list of all organization discovery domains associated with the specified organization. This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response.

see

https://auth0.com/docs/api/management/v2/organizations/get-discovery-domains

Link to this function

list_group_roles(organization_id, group_id, params, config)

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

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.

see

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

Link to this function

list_groups(organization_id, params, config)

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

List the groups that are assigned to the organization.

Lists the groups that are assigned to the specified organization.

see

https://auth0.com/docs/api/management/v2/organizations/get-organization-groups

Link to this function

list_invitations(id, params, config)

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

Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration.

see

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

Link to this function

list_member_effective_role_group_sources(id, user_id, params, config)

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

List organization member role group sources.

Lists the groups which grant the org member a given role.

see

https://auth0.com/docs/api/management/v2/organizations/get-organization-member-role-source-groups

Link to this function

list_member_effective_roles(id, user_id, params, config)

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

List organization member effective roles.

Lists the roles assigned to an organization member directly or through group membership.

see

https://auth0.com/docs/api/management/v2/organizations/get-organization-member-effective-roles

Link to this function

list_members(id, params, config)

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

List organization members.

see

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

Link to this function

list_role_groups(organization_id, role_id, params, config)

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

List the groups assigned to a role in the context of an organization.

Retrieve the list of groups assigned to a role in the context of an organization.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/organizations/get-organization-role-groups

Link to this function

list_role_members(id, role_id, params, config)

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

List the members assigned to a role in the context of an organization.

List the organization members assigned a specific role within the context of an organization. Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use GET /api/v2/organizations/{organization_id}/roles/{role_id}/groups.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/organizations/get-organization-role-members

Link to this function

list_roles(id, user_id, params, config)

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

Retrieve detailed list of roles assigned to a given user within the context of a specific Organization.

see

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

Link to this function

modify(id, params, config)

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

Update the details of a specific Organization, such as name and display name, branding options, and metadata.

see

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

Link to this function

modify_connection(id, connection_id, params, config)

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

Modify the details of a specific connection currently enabled for an Organization.

see

https://auth0.com/docs/api/management/v2/organizations/patch-enabled-connections-by-connection-id

Link to this function

remove_group_roles(organization_id, group_id, params, config)

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

Remove roles assigned to a group in an organization context.

Unassign one or more roles from a specified group in the context of an organization.

see

https://auth0.com/docs/api/management/v2/organizations/delete-organization-group-roles

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

Search organizations.

Retrieve details of organizations matching a search criteria. It is possible to:

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

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

Link to this function

update_associated_connection(id, connection_id, params, config)

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

Update a connection for an organization.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/organizations/patch-organization-connection

Link to this function

update_client(id, client_id, params, config)

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

Update an organization client association.

Early Access: this endpoint is marked as Early Access (x-release-lifecycle: EA) in the Auth0 Management API specification and may not be available on every tenant.

see

https://auth0.com/docs/api/management/v2/organizations/patch-organization-client

Link to this function

update_discovery_domain(id, discovery_domain_id, params, config)

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

Update an organization discovery domain.

Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The status field must be either pending or verified. The use_for_organization_discovery field can be true or false (default: true).

see

https://auth0.com/docs/api/management/v2/organizations/patch-discovery-domains-by-discovery-domain-id