Package com.auth0.client.mgmt
Class OrganizationsEntity
java.lang.Object
com.auth0.client.mgmt.OrganizationsEntity
Class that provides an implementation of the Organization endpoints of the Management API.
This class is not thread-safe.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected final okhttp3.HttpUrl
protected final Auth0HttpClient
protected final TokenProvider
-
Method Summary
Modifier and TypeMethodDescriptionaddClientGrant
(String orgId, CreateOrganizationClientGrantRequestBody addOrganizationClientGrantRequestBody) Associate a client grant with an organization.addConnection
(String orgId, EnabledConnection connection) Add a connection to an organization.addMembers
(String orgId, Members members) Add members to an organization.Add roles for a member of an organization.create
(Organization organization) Create an organization.createInvitation
(String orgId, Invitation invitation) Create an invitation.Delete an organization.deleteClientGrant
(String orgId, String grantId) Remove a client grant from an organization.deleteConnection
(String orgId, String connectionId) Delete a connection from an organization.deleteInvitation
(String orgId, String invitationId) Delete an invitation.deleteMembers
(String orgId, Members members) Delete members from an organization.deleteRoles
(String orgId, String userId, Roles roles) Delete roles from a member of an organization.Get an organization.Get an organization.getConnection
(String orgId, String connectionId) Get an organization's connection.getConnections
(String orgId, PageFilter filter) Get the connections of an organization.getInvitation
(String orgId, String invitationId, FieldsFilter filter) Get an invitation.getInvitations
(String orgId, InvitationsFilter filter) Gets all invitations for an organization.getMembers
(String orgId, PageFilter filter) Get the members of an organization.getMembers
(String orgId, PageFilter pageFilter, FieldsFilter fieldsFilter) Get the members of an organization.getRoles
(String orgId, String userId, PageFilter filter) Get the roles for a member of an organization.list
(PageFilter filter) Get all organizations.listClientGrants
(String orgId, OrganizationClientGrantsFilter filter) Get the client grants associated with this organization.protected <T> Request<T>
request
(HttpMethod method, com.fasterxml.jackson.core.type.TypeReference<T> target, Consumer<com.auth0.client.mgmt.RequestBuilder<T>> customizer) update
(String orgId, Organization organization) Update an organization.updateConnection
(String orgId, String connectionId, EnabledConnection connection) Update a connection of an organization.voidRequest
(HttpMethod method, Consumer<com.auth0.client.mgmt.RequestBuilder<Void>> customizer)
-
Field Details
-
client
-
baseUrl
protected final okhttp3.HttpUrl baseUrl -
tokenProvider
-
-
Method Details
-
list
Get all organizations. A token withread:organizations
scope is required.- Parameters:
filter
- an optional pagination filter- Returns:
- a Request to execute
- See Also:
-
get
Get an organization. A token withread:organizations
scope is required.- Parameters:
orgId
- the ID of the organization to retrieve- Returns:
- a Request to execute
- See Also:
-
getByName
Get an organization. A token withread:organizations
scope is required.- Parameters:
orgName
- the name of the organization to retrieve- Returns:
- a Request to execute
- See Also:
-
create
Create an organization. A token withcreate:organizations
scope is required.- Parameters:
organization
- the organization to create- Returns:
- a Request to execute
- See Also:
-
update
Update an organization. A token withupdate:organizations
scope is required.- Parameters:
orgId
- the ID of the organization to updateorganization
- the updated organization- Returns:
- a Request to execute
- See Also:
-
delete
Delete an organization. A token withdelete:organizations
scope is required.- Parameters:
orgId
- the ID of the organization to delete- Returns:
- a Request to execute
- See Also:
-
getMembers
Get the members of an organization. A token withread:organization_members
scope is required.- Parameters:
orgId
- the ID of the organizationfilter
- an optional pagination filter- Returns:
- a Request to execute
- See Also:
-
getMembers
public Request<MembersPage> getMembers(String orgId, PageFilter pageFilter, FieldsFilter fieldsFilter) Get the members of an organization. A token withread:organization_members
scope is required.
Member roles are not sent by default. Supply a FieldsFilter that includes "roles" (andincludeFields = true
to retrieve the roles assigned to each listed member. To include the roles in the response, you must include theread:organization_member_roles
scope in the token.- Parameters:
orgId
- the ID of the organizationpageFilter
- an optional pagination filterfieldsFilter
- an optional fields filter. If null, all fields (except roles) are returned.- Returns:
- a Request to execute
- See Also:
-
addMembers
Add members to an organization. A token withcreate:organization_members
scope is required.- Parameters:
orgId
- the ID of the organizationmembers
- The members to add- Returns:
- a Request to execute
- See Also:
-
deleteMembers
Delete members from an organization. A token withdelete:organization_members
scope is required.- Parameters:
orgId
- the ID of the organizationmembers
- The members to remove- Returns:
- a Request to execute
- See Also:
-
getConnections
Get the connections of an organization. A token withread:organization_connections
scope is required.- Parameters:
orgId
- the ID of the organizationfilter
- an optional pagination filter- Returns:
- a Request to execute
- See Also:
-
getConnection
Get an organization's connection.- Parameters:
orgId
- the ID of the organizationconnectionId
- the ID of the connection- Returns:
- a Request to execute
- See Also:
-
addConnection
Add a connection to an organization. A token withcreate:organization_connections
scope is required.- Parameters:
orgId
- the ID of the organizationconnection
- The connection to add- Returns:
- a Request to execute
- See Also:
-
deleteConnection
Delete a connection from an organization. A token withdelete:organization_connections
scope is required.- Parameters:
orgId
- the ID of the organizationconnectionId
- the ID of the connection to delete- Returns:
- a Request to execute
- See Also:
-
updateConnection
public Request<EnabledConnection> updateConnection(String orgId, String connectionId, EnabledConnection connection) Update a connection of an organization. A token withupdate:organization_connections
scope is required.- Parameters:
orgId
- the ID of the organizationconnectionId
- the ID of the connection to updateconnection
- the connection to update- Returns:
- a Request to execute
- See Also:
-
getRoles
Get the roles for a member of an organization. A token withread:organization_members
scope is required.- Parameters:
orgId
- the ID of the organizationuserId
- the ID of the userfilter
- an optional pagination filter- Returns:
- a Request to execute
- See Also:
-
addRoles
Add roles for a member of an organization. A token withcreate:organization_member_roles
scope is required.- Parameters:
orgId
- the ID of the organizationuserId
- the ID of the userroles
- the roles to add- Returns:
- a Request to execute
- See Also:
-
deleteRoles
Delete roles from a member of an organization. A token withdelete:organization_member_roles
scope is required.- Parameters:
orgId
- the ID of the organizationuserId
- the ID of the userroles
- the roles to delete- Returns:
- a Request to execute
- See Also:
-
createInvitation
Create an invitation. A token withcreate:organization_invitations
scope is required.- Parameters:
orgId
- the ID of the organizationinvitation
- the invitation to create- Returns:
- a Request to execute
- See Also:
-
getInvitation
Get an invitation. A token withread:organization_invitations
scope is required.- Parameters:
orgId
- the ID of the organizationinvitationId
- the ID of the invitationfilter
- an optional result filter- Returns:
- a Request to execute
- See Also:
-
getInvitations
Gets all invitations for an organization. A token withread:organization_invitations
scope is required.- Parameters:
orgId
- the ID of the organizationfilter
- an optional result filter- Returns:
- a Request to execute
- See Also:
-
deleteInvitation
Delete an invitation. A token withdelete:organization_invitations`
scope is required.- Parameters:
orgId
- the ID of the organizationinvitationId
- the ID of the invitation to delete- Returns:
- a Request to execute
- See Also:
-
listClientGrants
public Request<OrganizationClientGrantsPage> listClientGrants(String orgId, OrganizationClientGrantsFilter filter) Get the client grants associated with this organization. A token with scoperead:organization_client_grants
is required.- Parameters:
orgId
- the organization ID.filter
- an optional filter to refine results.- Returns:
- a request to execute.
-
addClientGrant
public Request<OrganizationClientGrant> addClientGrant(String orgId, CreateOrganizationClientGrantRequestBody addOrganizationClientGrantRequestBody) Associate a client grant with an organization. A token with scopecreate:organization_client_grants
is required.- Parameters:
orgId
- the organization ID.addOrganizationClientGrantRequestBody
- the body of the request containing information about the client grant to associate.- Returns:
- a request to execute.
-
deleteClientGrant
Remove a client grant from an organization. A token with scopedelete:organization_client_grants
is required.- Parameters:
orgId
- the organization ID.grantId
- the client grant ID.- Returns:
- a request to execute.
-
voidRequest
protected Request<Void> voidRequest(HttpMethod method, Consumer<com.auth0.client.mgmt.RequestBuilder<Void>> customizer) -
request
protected <T> Request<T> request(HttpMethod method, com.fasterxml.jackson.core.type.TypeReference<T> target, Consumer<com.auth0.client.mgmt.RequestBuilder<T>> customizer)
-