Class ConnectionsClient
- Namespace
- Auth0.ManagementApi
- Assembly
- Auth0.ManagementApi.dll
public class ConnectionsClient : IConnectionsClient
- Inheritance
-
ConnectionsClient
- Implements
- Inherited Members
- Extension Methods
Properties
Clients
public IClientsClient Clients { get; }
Property Value
DirectoryProvisioning
public IDirectoryProvisioningClient DirectoryProvisioning { get; }
Property Value
Keys
public IKeysClient Keys { get; }
Property Value
ScimConfiguration
public IScimConfigurationClient ScimConfiguration { get; }
Property Value
Users
public IUsersClient Users { get; }
Property Value
Methods
CheckStatusAsync(string, RequestOptions?, CancellationToken)
Retrieves the status of an ad/ldap connection referenced by its ID. 200 OK http status code response is returned when the connection is online, otherwise a 404 status code is returned along with an error message
public Task CheckStatusAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Connections.CheckStatusAsync("id");
CreateAsync(CreateConnectionRequestContent, RequestOptions?, CancellationToken)
Creates a new connection according to the JSON object received in body.
Note: If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.
public WithRawResponseTask<CreateConnectionResponseContent> CreateAsync(CreateConnectionRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
requestCreateConnectionRequestContentoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Connections.CreateAsync(
new CreateConnectionRequestContent
{
Name = "name",
Strategy = ConnectionIdentityProviderEnum.Ad,
}
);
DeleteAsync(string, RequestOptions?, CancellationToken)
Removes a specific connection from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate.
Note: If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent create connection requests, if they use an identical connection name.
public Task DeleteAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Connections.DeleteAsync("id");
GetAsync(string, GetConnectionRequestParameters, RequestOptions?, CancellationToken)
Retrieve details for a specified connection along with options that can be used for identity provider configuration.
public WithRawResponseTask<GetConnectionResponseContent> GetAsync(string id, GetConnectionRequestParameters request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringrequestGetConnectionRequestParametersoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Connections.GetAsync(
"id",
new GetConnectionRequestParameters { Fields = "fields", IncludeFields = true }
);
ListAsync(ListConnectionsQueryParameters, RequestOptions?, CancellationToken)
Retrieves detailed list of all connections that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections.
This endpoint supports two types of pagination:
- Offset pagination
- Checkpoint pagination
Checkpoint pagination must be used if you need to retrieve more than 1000 connections.
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, 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.
public Task<Pager<ConnectionForList>> ListAsync(ListConnectionsQueryParameters request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
requestListConnectionsQueryParametersoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Connections.ListAsync(
new ListConnectionsQueryParameters
{
From = "from",
Take = 1,
Name = "name",
Fields = "fields",
IncludeFields = true,
}
);
UpdateAsync(string, UpdateConnectionRequestContent, RequestOptions?, CancellationToken)
Update details for a specific connection, including option properties for identity provider configuration.
Note: If you use the options parameter, the entire options object is overriden. To avoid partial data or other issues, ensure all parameters are present when using this option.
public WithRawResponseTask<UpdateConnectionResponseContent> UpdateAsync(string id, UpdateConnectionRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringrequestUpdateConnectionRequestContentoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Connections.UpdateAsync("id", new UpdateConnectionRequestContent());