Back to Node Auth0

Class MembersClient

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

5.9.17.6 KB
Original Source

Class MembersClient

Index

Accessors

roles

Constructors

constructor

Methods

listcreatedelete

Properties

_options_roles

Accessors

roles

get roles(): RolesClient

Returns RolesClient

Constructors

constructor

new MembersClient(options: BaseClientOptions): MembersClient

Parameters

Returns MembersClient

Methods

list

list(
id: string,
request?: ListOrganizationMembersRequestParameters,
requestOptions?: MembersClient.RequestOptions,
): Promise<
Page<
OrganizationMember,
ListOrganizationMembersPaginatedResponseContent,
>,
>

List organization members. This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it.

  • Use the fields parameter to optionally define the specific member details retrieved. If fields is left blank, all fields (except roles) are returned.
  • Member roles are not sent by default. Use fields=roles to retrieve the roles assigned to each listed member. To use this parameter, you must include the read:organization_member_roles scope in the token.

This endpoint supports two types of pagination:

  • Offset pagination
  • Checkpoint pagination

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

Checkpoint Pagination

To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the from parameter. If there are more results, a next value will be included in the response. You can use this for subsequent API calls. When next is no longer included in the response, this indicates there are no more pages remaining.

Parameters

  • id: string

Organization identifier.

Request-specific configuration.

Returns Promise< Page< OrganizationMember, ListOrganizationMembersPaginatedResponseContent, >, >

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.organizations.members.list("id", { from: "from", take: 1, fields: "fields", include_fields: true })Copy

create

create(
id: string,
request: CreateOrganizationMemberRequestContent,
requestOptions?: MembersClient.RequestOptions,
): HttpResponsePromise<void>

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

To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can invite them to create an account, manually create them through the Auth0 Dashboard, or use the Management API.

Parameters

  • id: string

Organization identifier.

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.organizations.members.create("id", { members: ["members"] })Copy

delete

delete(
id: string,
request: DeleteOrganizationMembersRequestContent,
requestOptions?: MembersClient.RequestOptions,
): HttpResponsePromise<void>

Parameters

  • id: string

Organization identifier.

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.organizations.members.delete("id", { members: ["members"] })Copy

Properties

Protected Readonly_options

_options: NormalizedClientOptionsWithAuth<BaseClientOptions>

Protected_roles

_roles: RolesClient | undefined

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Accessors roles Constructors constructor Methods listcreatedelete Properties _options_roles