Auth0-PHP

OrganizationsInterface
in

Interface OrganizationsInterface.

Table of Contents

addEnabledConnection()  : ResponseInterface
Add a connection to an organization.
addMemberRoles()  : ResponseInterface
Add one or more roles to a member (user) in an organization.
addMembers()  : ResponseInterface
Add one or more users to an organization as members.
create()  : ResponseInterface
Create an organization.
createInvitation()  : ResponseInterface
Create an invitation for an organization Required scope: `create:organization_invitations`.
delete()  : ResponseInterface
Delete an organization.
deleteInvitation()  : ResponseInterface
Delete an invitation (by ID) for an organization Required scope: `delete:organization_invitations`.
get()  : ResponseInterface
Get a specific organization.
getAll()  : ResponseInterface
List available organizations.
getByName()  : ResponseInterface
Get details about an organization, queried by it's `name`.
getEnabledConnection()  : ResponseInterface
Get a connection (by ID) associated with an organization.
getEnabledConnections()  : ResponseInterface
List the enabled connections associated with an organization.
getInvitation()  : ResponseInterface
Get an invitation (by ID) for an organization Required scope: `read:organization_invitations`.
getInvitations()  : ResponseInterface
List invitations for an organization Required scope: `read:organization_invitations`.
getMemberRoles()  : ResponseInterface
List the roles a member (user) in an organization currently has.
getMembers()  : ResponseInterface
List the members (users) belonging to an organization Required scope: `read:organization_members`.
removeEnabledConnection()  : ResponseInterface
Remove a connection from an organization.
removeMemberRoles()  : ResponseInterface
Remove one or more roles from a member (user) in an organization.
removeMembers()  : ResponseInterface
Remove one or more members (users) from an organization.
update()  : ResponseInterface
Update an organization.
updateEnabledConnection()  : ResponseInterface
Update a connection to an organization.

Methods

addEnabledConnection()

Add a connection to an organization.

public addEnabledConnection(string $id, string $connectionId, array<string|int, mixed> $body[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: create:organization_connections.

Parameters
$id : string

organization (by ID) to add a connection to

$connectionId : string

connection (by ID) to add to organization

$body : array<string|int, mixed>

Additional body content to send with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id or connectionId are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/post_enabled_connections
Return values
ResponseInterface

addMemberRoles()

Add one or more roles to a member (user) in an organization.

public addMemberRoles(string $id, string $userId, array<string|int, string> $roles[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: create:organization_member_roles.

Parameters
$id : string

organization (by ID) user belongs to

$userId : string

user (by ID) to add roles to

$roles : array<string|int, string>

one or more roles (by ID) to add to the user

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id, userId, or roles are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/post_organization_member_roles
Return values
ResponseInterface

addMembers()

Add one or more users to an organization as members.

public addMembers(string $id, array<string|int, string> $members[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: update:organization_members.

Parameters
$id : string

organization (by ID) to add new members to

$members : array<string|int, string>

one or more users (by ID) to add from the organization

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id or members are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/post_members
Return values
ResponseInterface

create()

Create an organization.

public create(string $name, string $displayName[, array<string|int, mixed>|null $branding = null ][, array<string|int, mixed>|null $metadata = null ][, array<string|int, mixed>|null $body = null ][, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: create:organizations.

Parameters
$name : string

the name of the Organization

$displayName : string

the displayed name of the Organization

$branding : array<string|int, mixed>|null = null

Optional. An array containing branding customizations for the organization.

$metadata : array<string|int, mixed>|null = null

Optional. Additional metadata to store about the organization.

$body : array<string|int, mixed>|null = null

Optional. Additional body content to pass with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid name or displayName are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/post_organizations
Return values
ResponseInterface

createInvitation()

Create an invitation for an organization Required scope: `create:organization_invitations`.

public createInvitation(string $id, string $clientId, array<string|int, string> $inviter, array<string|int, string> $invitee[, array<string|int, mixed>|null $body = null ][, RequestOptions|null $options = null ]) : ResponseInterface
Parameters
$id : string

organization (by ID) to create the invitation for

$clientId : string

Client (by ID) to create the invitation for. This Client must be associated with the Organization.

$inviter : array<string|int, string>

An array containing information about the inviter. Requires a 'name' key minimally.

  • 'name' Required. A name to identify who is sending the invitation.
$invitee : array<string|int, string>

An array containing information about the invitee. Requires an 'email' key.

  • 'email' Required. An email address where the invitation should be sent.
$body : array<string|int, mixed>|null = null

Optional. Additional body content to pass with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id, clientId, inviter, or invitee are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/post_invitations
Return values
ResponseInterface

delete()

Delete an organization.

public delete(string $id[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: delete:organizations.

Parameters
$id : string

organization (by ID) to delete

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id is provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/delete_organizations_by_id
Return values
ResponseInterface

deleteInvitation()

Delete an invitation (by ID) for an organization Required scope: `delete:organization_invitations`.

public deleteInvitation(string $id, string $invitationId[, RequestOptions|null $options = null ]) : ResponseInterface
Parameters
$id : string

organization (by ID) to request

$invitationId : string

invitation (by ID) to request

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id or invitationId are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/delete_invitations_by_invitation_id
Return values
ResponseInterface

get()

Get a specific organization.

public get(string $id[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:organizations.

Parameters
$id : string

organization (by ID) to retrieve details for

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id is provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/get_organizations_by_id
Return values
ResponseInterface

getAll()

List available organizations.

public getAll([RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:organizations.

Parameters
$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/get_organizations
Return values
ResponseInterface

getByName()

Get details about an organization, queried by it's `name`.

public getByName(string $name[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:organizations.

Parameters
$name : string

organization (by name parameter provided during creation) to retrieve details for

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid name is provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/get_name_by_name
Return values
ResponseInterface

getEnabledConnection()

Get a connection (by ID) associated with an organization.

public getEnabledConnection(string $id, string $connectionId[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:organization_connections.

Parameters
$id : string

organization (by ID) that the connection is associated with

$connectionId : string

connection (by ID) to retrieve details for

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id or connectionId are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/get_enabled_connections_by_connectionId
Return values
ResponseInterface

getEnabledConnections()

List the enabled connections associated with an organization.

public getEnabledConnections(string $id[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:organization_connections.

Parameters
$id : string

organization (by ID) to list connections of

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id is provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/get_enabled_connections
Return values
ResponseInterface

getInvitation()

Get an invitation (by ID) for an organization Required scope: `read:organization_invitations`.

public getInvitation(string $id, string $invitationId[, RequestOptions|null $options = null ]) : ResponseInterface
Parameters
$id : string

organization (by ID) to request

$invitationId : string

invitation (by ID) to request

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id or invitationId are provided

throws
NetworkException

When the API request fails due to a network error.

https://auth0.com/docs/api/management/v2#!/Organizations/get_invitations_by_invitation_id

Return values
ResponseInterface

getInvitations()

List invitations for an organization Required scope: `read:organization_invitations`.

public getInvitations(string $id[, RequestOptions|null $options = null ]) : ResponseInterface
Parameters
$id : string

organization (by ID) to list invitations for

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id is provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/get_invitations
Return values
ResponseInterface

getMemberRoles()

List the roles a member (user) in an organization currently has.

public getMemberRoles(string $id, string $userId[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:organization_member_roles.

Parameters
$id : string

organization (by ID) user belongs to

$userId : string

user (by ID) to add role to

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id or userId are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/get_organization_member_roles
Return values
ResponseInterface

getMembers()

List the members (users) belonging to an organization Required scope: `read:organization_members`.

public getMembers(string $id[, RequestOptions|null $options = null ]) : ResponseInterface
Parameters
$id : string

organization (by ID) to list members of

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id is provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/get_members
Return values
ResponseInterface

removeEnabledConnection()

Remove a connection from an organization.

public removeEnabledConnection(string $id, string $connectionId[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: delete:organization_connections.

Parameters
$id : string

organization (by ID) to remove connection from

$connectionId : string

connection (by ID) to remove from organization

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id or connectionId are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/delete_enabled_connections_by_connectionId
Return values
ResponseInterface

removeMemberRoles()

Remove one or more roles from a member (user) in an organization.

public removeMemberRoles(string $id, string $userId, array<string|int, string> $roles[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: delete:organization_member_roles.

Parameters
$id : string

organization (by ID) user belongs to

$userId : string

user (by ID) to remove roles from

$roles : array<string|int, string>

one or more roles (by ID) to remove from the user

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id, userId, or roles are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/delete_organization_member_roles
Return values
ResponseInterface

removeMembers()

Remove one or more members (users) from an organization.

public removeMembers(string $id, array<string|int, string> $members[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: delete:organization_members.

Parameters
$id : string

organization (by ID) users belong to

$members : array<string|int, string>

one or more users (by ID) to remove from the organization

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id or members are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/delete_members
Return values
ResponseInterface

update()

Update an organization.

public update(string $id, string $name, string $displayName[, array<string|int, mixed>|null $branding = null ][, array<string|int, mixed>|null $metadata = null ][, array<string|int, mixed>|null $body = null ][, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: update:organizations.

Parameters
$id : string

organization (by ID) to update

$name : string

the name of the Organization

$displayName : string

the displayed name of the Organization

$branding : array<string|int, mixed>|null = null

Optional. An array containing branding customizations for the organization.

$metadata : array<string|int, mixed>|null = null

Optional. Additional metadata to store about the organization.

$body : array<string|int, mixed>|null = null

Optional. Additional body content to pass with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id or displayName are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/patch_organizations_by_id
Return values
ResponseInterface

updateEnabledConnection()

Update a connection to an organization.

public updateEnabledConnection(string $id, string $connectionId, array<string|int, mixed> $body[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: update:organization_connections.

Parameters
$id : string

organization (by ID) to add a connection to

$connectionId : string

connection (by ID) to add to organization

$body : array<string|int, mixed>

Additional body content to pass with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Tags
throws
ArgumentException

when an invalid id or connectionId are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Organizations/patch_enabled_connections_by_connectionId
Return values
ResponseInterface

Search results