Back to Node Auth0

Class OrganizationsClient

docs/classes/management.SDK.OrganizationsClient-1.html

5.9.113.8 KB
Original Source

Class OrganizationsClient

Index

Accessors

clientGrantsconnectionsdiscoveryDomainsenabledConnectionsinvitationsmembers

Constructors

constructor

Methods

listcreategetByNamegetdeleteupdate

Properties

_options_clientGrants_connections_discoveryDomains_enabledConnections_invitations_members

Accessors

clientGrants

get clientGrants(): ClientGrantsClient

Returns ClientGrantsClient

connections

get connections(): ConnectionsClient

Returns ConnectionsClient

discoveryDomains

get discoveryDomains(): DiscoveryDomainsClient

Returns DiscoveryDomainsClient

enabledConnections

get enabledConnections(): EnabledConnectionsClient

Returns EnabledConnectionsClient

invitations

get invitations(): InvitationsClient

Returns InvitationsClient

members

get members(): MembersClient

Returns MembersClient

Constructors

constructor

new OrganizationsClient(options: BaseClientOptions): OrganizationsClient

Parameters

Returns OrganizationsClient

Methods

list

list(
request?: ListOrganizationsRequestParameters,
requestOptions?: OrganizationsClient.RequestOptions,
): Promise<Page<Organization, ListOrganizationsPaginatedResponseContent>>

Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations.

This endpoint supports two types of pagination:

  • Offset pagination
  • Checkpoint pagination

Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

Checkpoint Pagination

To search by checkpoint, use the following parameters:

  • from: Optional id from which to start selection.
  • take: The total number of entries to retrieve when using the from parameter. Defaults to 50.

Note : The first time you call this endpoint using checkpoint pagination, 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 pages are remaining.

Parameters

Request-specific configuration.

Returns Promise<Page<Organization, ListOrganizationsPaginatedResponseContent>>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.organizations.list({ from: "from", take: 1, sort: "sort" })Copy

create

create(
request: CreateOrganizationRequestContent,
requestOptions?: OrganizationsClient.RequestOptions,
): HttpResponsePromise<CreateOrganizationResponseContent>

Create a new Organization within your tenant. To learn more about Organization settings, behavior, and configuration options, review Create Your First Organization.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<CreateOrganizationResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.organizations.create({ name: "name" })Copy

getByName

getByName(
name: string,
requestOptions?: OrganizationsClient.RequestOptions,
): HttpResponsePromise<GetOrganizationByNameResponseContent>

Retrieve details about a single Organization specified by name.

Parameters

  • name: string

name of the organization to retrieve.

Request-specific configuration.

Returns HttpResponsePromise<GetOrganizationByNameResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.organizations.getByName("name")Copy

get

get(
id: string,
requestOptions?: OrganizationsClient.RequestOptions,
): HttpResponsePromise<GetOrganizationResponseContent>

Retrieve details about a single Organization specified by ID.

Parameters

  • id: string

ID of the organization to retrieve.

Request-specific configuration.

Returns HttpResponsePromise<GetOrganizationResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.organizations.get("id")Copy

delete

delete(
id: string,
requestOptions?: OrganizationsClient.RequestOptions,
): HttpResponsePromise<void>

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

Note : Members are automatically disassociated from an Organization when it is deleted. However, this action does not delete these users from your tenant.

Parameters

  • id: string

Organization identifier.

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.organizations.delete("id")Copy

update

update(
id: string,
request?: UpdateOrganizationRequestContent,
requestOptions?: OrganizationsClient.RequestOptions,
): HttpResponsePromise<UpdateOrganizationResponseContent>

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

Parameters

  • id: string

ID of the organization to update.

Request-specific configuration.

Returns HttpResponsePromise<UpdateOrganizationResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.organizations.update("id")Copy

Properties

Protected Readonly_options

_options: NormalizedClientOptionsWithAuth<BaseClientOptions>

Protected_clientGrants

_clientGrants: ClientGrantsClient | undefined

Protected_connections

_connections: ConnectionsClient | undefined

Protected_discoveryDomains

_discoveryDomains: DiscoveryDomainsClient | undefined

Protected_enabledConnections

_enabledConnections: EnabledConnectionsClient | undefined

Protected_invitations

_invitations: InvitationsClient | undefined

Protected_members

_members: MembersClient | undefined

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Accessors clientGrantsconnectionsdiscoveryDomainsenabledConnectionsinvitationsmembers Constructors constructor Methods listcreategetByNamegetdeleteupdate Properties _options_clientGrants_connections_discoveryDomains_enabledConnections_invitations_members