Class OrganizationsClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
public class OrganizationsClient : BaseClient, IOrganizationsClient
- Inheritance
-
OrganizationsClient
- Implements
- Inherited Members
Constructors
OrganizationsClient(IManagementConnection, Uri, IDictionary<string, string>)
Initializes a new instance of ClientsClient.
public OrganizationsClient(IManagementConnection connection, Uri baseUri, IDictionary<string, string> defaultHeaders)
Parameters
connectionIManagementConnectionIManagementConnection used to make all API calls.
baseUriUriUri of the endpoint to use in making API calls.
defaultHeadersIDictionary<string, string>Dictionary containing default headers included with every request this client makes.
Methods
AddMemberRolesAsync(string, string, OrganizationAddMemberRolesRequest, CancellationToken)
Add members to an organization.
public Task AddMemberRolesAsync(string organizationId, string userId, OrganizationAddMemberRolesRequest request, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to add roles to the given user.
userIdstringThe id of the user for which you want to add roles.
requestOrganizationAddMemberRolesRequestThe OrganizationAddMemberRolesRequest containing the roles.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
AddMembersAsync(string, OrganizationAddMembersRequest, CancellationToken)
Add members to an organization.
public Task AddMembersAsync(string organizationId, OrganizationAddMembersRequest request, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to add members.
requestOrganizationAddMembersRequestThe OrganizationAddMembersRequest containing the members.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
CreateAsync(OrganizationCreateRequest, CancellationToken)
Creates a new organization.
public Task<Organization> CreateAsync(OrganizationCreateRequest request, CancellationToken cancellationToken = default)
Parameters
requestOrganizationCreateRequestThe OrganizationCreateRequest containing the properties of the new organization.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<Organization>
The new Organization that has been created.
CreateClientGrantAsync(string, OrganizationCreateClientGrantRequest, CancellationToken)
Associate a client grant with an organization
public Task<OrganizationClientGrant> CreateClientGrantAsync(string organizationId, OrganizationCreateClientGrantRequest request, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization to which you want to associate the client grants.
requestOrganizationCreateClientGrantRequestThe OrganizationCreateClientGrantRequest containing the properties of the Client Grant to associate with the organization.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<OrganizationClientGrant>
The new ClientGrant that has been created.
CreateConnectionAsync(string, OrganizationConnectionCreateRequest, CancellationToken)
Creates a new organization connection.
public Task<OrganizationConnection> CreateConnectionAsync(string organizationId, OrganizationConnectionCreateRequest request, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to add the connection.
requestOrganizationConnectionCreateRequestThe OrganizationConnectionCreateRequest containing the properties of the new organization connection.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<OrganizationConnection>
The new OrganizationConnection that has been created.
CreateInvitationAsync(string, OrganizationCreateInvitationRequest, CancellationToken)
Creates a new organization invitation.
public Task<OrganizationInvitation> CreateInvitationAsync(string organizationId, OrganizationCreateInvitationRequest request, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization to which you want to invite a user.
requestOrganizationCreateInvitationRequestThe OrganizationCreateInvitationRequest containing the properties of the new organization invitation.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<OrganizationInvitation>
The new OrganizationInvitation that has been created.
DeleteAsync(string, CancellationToken)
Deletes an organization.
public Task DeleteAsync(string id, CancellationToken cancellationToken = default)
Parameters
idstringThe id of the organization to delete.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
DeleteClientGrantAsync(string, string, CancellationToken)
Remove a client grant from an organization.
public Task DeleteClientGrantAsync(string organizationId, string clientGrantId, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to delete the client grant.
clientGrantIdstringThe id of the client grant you want to delete from the organization
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
DeleteConnectionAsync(string, string, CancellationToken)
Deletes an organization connection.
public Task DeleteConnectionAsync(string organizationId, string connectionId, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to delete the connection.
connectionIdstringThe id of the connection to delete from the organization.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
DeleteInvitationAsync(string, string, CancellationToken)
Deletes an organization invitation.
public Task DeleteInvitationAsync(string organizationId, string invitationId, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to delete the invitation.
invitationIdstringThe id of the invitation you want to remove.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
DeleteMemberAsync(string, OrganizationDeleteMembersRequest, CancellationToken)
Deletes members from an organization.
public Task DeleteMemberAsync(string organizationId, OrganizationDeleteMembersRequest request, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to delete the members.
requestOrganizationDeleteMembersRequestThe OrganizationDeleteMembersRequest containing the members.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
DeleteMemberRolesAsync(string, string, OrganizationDeleteMemberRolesRequest, CancellationToken)
Deletes roles from an organization member.
public Task DeleteMemberRolesAsync(string organizationId, string userId, OrganizationDeleteMemberRolesRequest request, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to delete roles for a given user.
userIdstringThe id of the user for which you want to remove roles.
requestOrganizationDeleteMemberRolesRequestThe OrganizationDeleteMemberRolesRequest containing the roles.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
GetAllAsync(CheckpointPaginationInfo, CancellationToken)
Retrieves a list of all organizations using checkpoint pagination.
public Task<ICheckpointPagedList<Organization>> GetAllAsync(CheckpointPaginationInfo pagination, CancellationToken cancellationToken = default)
Parameters
paginationCheckpointPaginationInfoSpecifies CheckpointPaginationInfo to use in requesting checkpoint-paginated results.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<ICheckpointPagedList<Organization>>
An ICheckpointPagedList<T> containing the organizations.
GetAllAsync(PaginationInfo, CancellationToken)
Retrieves a list of all organizations.
public Task<IPagedList<Organization>> GetAllAsync(PaginationInfo pagination, CancellationToken cancellationToken = default)
Parameters
paginationPaginationInfoSpecifies pagination info to use when requesting paged results.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<Organization>>
An IPagedList<T> containing the organizations.
GetAllClientGrantsAsync(string, OrganizationGetClientGrantsRequest, PaginationInfo, CancellationToken)
Get client grants associated to an organization.
public Task<IPagedList<OrganizationClientGrant>> GetAllClientGrantsAsync(string organizationId, OrganizationGetClientGrantsRequest request, PaginationInfo pagination = null, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to retrieve the client grants.
requestOrganizationGetClientGrantsRequestSpecifies criteria to use when querying client grants for the organization.
paginationPaginationInfoSpecifies PaginationInfo to use in requesting paged results.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<OrganizationClientGrant>>
A IPagedList<T> containing the client grants requested.
GetAllConnectionsAsync(string, PaginationInfo, CancellationToken)
Retrieves a list of all organization connections.
public Task<IPagedList<OrganizationConnection>> GetAllConnectionsAsync(string organizationId, PaginationInfo pagination, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe ID of the organization for which you want to retrieve the connections.
paginationPaginationInfoSpecifies pagination info to use when requesting paged results.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<OrganizationConnection>>
An IPagedList<T> containing the organization connections.
GetAllInvitationsAsync(string, OrganizationGetAllInvitationsRequest, PaginationInfo, CancellationToken)
Retrieves a list of all organization invitations.
public Task<IPagedList<OrganizationInvitation>> GetAllInvitationsAsync(string organizationId, OrganizationGetAllInvitationsRequest request, PaginationInfo pagination, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to retrieve the invitations.
requestOrganizationGetAllInvitationsRequestThe OrganizationGetAllInvitationsRequest containing the properties to retrieve the organization invitations.
paginationPaginationInfoSpecifies pagination info to use when requesting paged results.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<OrganizationInvitation>>
An IPagedList<T> containing the organization members.
GetAllMemberRolesAsync(string, string, PaginationInfo, CancellationToken)
Retrieves a list of all roles for an organization members.
public Task<IPagedList<Role>> GetAllMemberRolesAsync(string organizationId, string userId, PaginationInfo pagination, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to retrieve the roles for a given user.
userIdstringThe id of the user for which you want to retrieve the roles.
paginationPaginationInfoSpecifies pagination info to use when requesting paged results.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<Role>>
An IPagedList<T> containing the organization members.
GetAllMembersAsync(string, OrganizationGetAllMembersRequest, CheckpointPaginationInfo, CancellationToken)
Retrieves a list of all organization members using checkpoint pagination.
public Task<ICheckpointPagedList<OrganizationMember>> GetAllMembersAsync(string organizationId, OrganizationGetAllMembersRequest request, CheckpointPaginationInfo pagination, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe ID of the organization for which you want to retrieve the members.
requestOrganizationGetAllMembersRequestSpecifies criteria to use when querying organization members.
paginationCheckpointPaginationInfoSpecifies CheckpointPaginationInfo to use in requesting checkpoint-paginated results.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<ICheckpointPagedList<OrganizationMember>>
An ICheckpointPagedList<T> containing the organization members.
GetAllMembersAsync(string, OrganizationGetAllMembersRequest, PaginationInfo, CancellationToken)
Retrieves a list of all organization members.
public Task<IPagedList<OrganizationMember>> GetAllMembersAsync(string organizationId, OrganizationGetAllMembersRequest request, PaginationInfo pagination, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe ID of the organization for which you want to retrieve the members.
requestOrganizationGetAllMembersRequestSpecifies criteria to use when querying organization members.
paginationPaginationInfoSpecifies pagination info to use when requesting paged results.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<OrganizationMember>>
An IPagedList<T> containing the organization members.
GetAllMembersAsync(string, CheckpointPaginationInfo, CancellationToken)
Retrieves a list of all organization members using checkpoint pagination.
public Task<ICheckpointPagedList<OrganizationMember>> GetAllMembersAsync(string organizationId, CheckpointPaginationInfo pagination, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe ID of the organization for which you want to retrieve the members.
paginationCheckpointPaginationInfoSpecifies CheckpointPaginationInfo to use in requesting checkpoint-paginated results.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<ICheckpointPagedList<OrganizationMember>>
An ICheckpointPagedList<T> containing the organization members.
GetAllMembersAsync(string, PaginationInfo, CancellationToken)
Retrieves a list of all organization members.
public Task<IPagedList<OrganizationMember>> GetAllMembersAsync(string organizationId, PaginationInfo pagination, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe ID of the organization for which you want to retrieve the members.
paginationPaginationInfoSpecifies pagination info to use when requesting paged results.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<OrganizationMember>>
An IPagedList<T> containing the organization members.
GetAsync(string, CancellationToken)
Retrieves an organization by its id.
public Task<Organization> GetAsync(string id, CancellationToken cancellationToken = default)
Parameters
idstringThe id of the organization to retrieve.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<Organization>
The Organization retrieved.
GetByNameAsync(string, CancellationToken)
Retrieves an organization by its name.
public Task<Organization> GetByNameAsync(string name, CancellationToken cancellationToken = default)
Parameters
namestringThe name of the organization to retrieve.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<Organization>
The Organization retrieved.
GetConnectionAsync(string, string, CancellationToken)
Retrieves an organization connection by its id.
public Task<OrganizationConnection> GetConnectionAsync(string organizationId, string connectionId, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to retrieve the connection.
connectionIdstringThe id of the connection to retrieve.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<OrganizationConnection>
The OrganizationConnection retrieved.
GetInvitationAsync(string, string, OrganizationGetInvitationRequest, CancellationToken)
Retrieves an organization invitation by its id.
public Task<OrganizationInvitation> GetInvitationAsync(string organizationId, string invitationId, OrganizationGetInvitationRequest request, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to retrieve the invitation.
invitationIdstringThe id of the organization invitation to retrieve.
requestOrganizationGetInvitationRequestThe OrganizationGetInvitationRequest containing the properties to retrieve the organization invitation.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<OrganizationInvitation>
The OrganizationInvitation retrieved.
UpdateAsync(string, OrganizationUpdateRequest, CancellationToken)
Updates an organization.
public Task<Organization> UpdateAsync(string id, OrganizationUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
idstringThe id of the organization you want to update.
requestOrganizationUpdateRequestThe OrganizationUpdateRequest containing the properties of the organization you want to update.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<Organization>
The Organization that was updated.
UpdateConnectionAsync(string, string, OrganizationConnectionUpdateRequest, CancellationToken)
Updates an organization connection.
public Task<OrganizationConnection> UpdateConnectionAsync(string organizationId, string connectionId, OrganizationConnectionUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
organizationIdstringThe id of the organization for which you want to update the connection.
connectionIdstringThe id of the connection you want to update for the organization.
requestOrganizationConnectionUpdateRequestThe OrganizationConnectionUpdateRequest containing the properties of the organization connection you want to update.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<OrganizationConnection>
The OrganizationConnection that was updated.