API version:
Show / Hide Table of Contents

Interface IOktaClient

A client that communicates with the Okta Management API.

Namespace: Okta.Sdk
Assembly: Okta.Sdk.dll
Syntax
public interface IOktaClient

Properties

Applications

Gets a IApplicationsClient that interacts with the Okta Applications API.

Declaration
IApplicationsClient Applications { get; }
Property Value
Type Description
IApplicationsClient

A IApplicationsClient that interacts with the Okta Applications API.

AuthorizationServers

Gets an IAuthorizationServersClient that interacts with the Okta Authorization Servers API.

Declaration
IAuthorizationServersClient AuthorizationServers { get; }
Property Value
Type Description
IAuthorizationServersClient

An IAuthorizationServersClient that interacts with the Okta Authorization Servers API.

Configuration

Gets the configuration passed to this IOktaClient.

Declaration
OktaClientConfiguration Configuration { get; }
Property Value
Type Description
OktaClientConfiguration

The client configuration.

Remarks

The configuration is immutable after the client is initialized. This property references a copy of the configuration.

Domains

Gets a IDomainsClient that interacts with the Okta Domains API.

Declaration
IDomainsClient Domains { get; }
Property Value
Type Description
IDomainsClient

A IDomainsClient that interacts with the Okta Domains API.

EventHooks

Gets an IEventHooksClient that interacts with the Okta Event Hooks API.

Declaration
IEventHooksClient EventHooks { get; }
Property Value
Type Description
IEventHooksClient

An IEventHooksClient that interacts with the Okta Event Hooks API.

Features

Gets a IFeaturesClient that interacts with the Okta Features API.

Declaration
IFeaturesClient Features { get; }
Property Value
Type Description
IFeaturesClient

A IFeaturesClient that interacts with the Okta Features API.

Groups

Gets a IGroupsClient that interacts with the Okta Groups API.

Declaration
IGroupsClient Groups { get; }
Property Value
Type Description
IGroupsClient

A IGroupsClient that interacts with the Okta Groups API.

IdentityProviders

Gets an IIdentityProvidersClient that interacts with the Okta Identity Providers API.

Declaration
IIdentityProvidersClient IdentityProviders { get; }
Property Value
Type Description
IIdentityProvidersClient

An IIdentityProvidersClient that interacts with the Okta Identity Providers API.

InlineHooks

Gets an IInlineHooksClient that interacts with the Okta Inline Hooks API.

Declaration
IInlineHooksClient InlineHooks { get; }
Property Value
Type Description
IInlineHooksClient

An IInlineHooksClient that interacts with the Okta Inline Hooks API.

LinkedObjects

Gets an ILinkedObjectsClient that interacts with the Okta Linked Objects API.

Declaration
ILinkedObjectsClient LinkedObjects { get; }
Property Value
Type Description
ILinkedObjectsClient

An ILinkedObjectsClient that interacts with the Okta Linked Objects API.

Logs

Gets a ILogsClient that interacts with the Okta Logs API.

Declaration
ILogsClient Logs { get; }
Property Value
Type Description
ILogsClient

A ILogsClient that interacts with the Okta Logs API.

NetworkZones

Gets a INetworkZonesClient that interacts with the Okta Network Zones API.

Declaration
INetworkZonesClient NetworkZones { get; }
Property Value
Type Description
INetworkZonesClient

A INetworkZonesClient that interacts with the Okta Network Zones API.

Policies

Gets a IPoliciesClient that interacts with the Okta Policies API

Declaration
IPoliciesClient Policies { get; }
Property Value
Type Description
IPoliciesClient

A IPoliciesClient that interacts with the Okta Policies API.

Sessions

Gets a ISessionsClient that interacts with the Okta Sessions API.

Declaration
ISessionsClient Sessions { get; }
Property Value
Type Description
ISessionsClient

A ISessionsClient that interacts with the Okta Sessions API.

Templates

Gets a ITemplatesClient that interacts with the Okta Templates API.

Declaration
ITemplatesClient Templates { get; }
Property Value
Type Description
ITemplatesClient

A ITemplatesClient that interacts with the Okta Templates API.

TrustedOrigins

Gets an ITrustedOriginsClient that interacts with the Okta Trusted Origins API.

Declaration
ITrustedOriginsClient TrustedOrigins { get; }
Property Value
Type Description
ITrustedOriginsClient

An ITrustedOriginsClient that interacts with the Okta Trusted Origins API.

UserFactors

Gets a IUserFactorsClient that interacts with the Okta Factors API.

Declaration
IUserFactorsClient UserFactors { get; }
Property Value
Type Description
IUserFactorsClient

A IUserFactorsClient that interacts with the Okta Factors API.

Users

Gets a IUsersClient that interacts with the Okta Users API.

Declaration
IUsersClient Users { get; }
Property Value
Type Description
IUsersClient

A IUsersClient that interacts with the Okta Users API.

UserSchemas

Gets an IUserSchemasClient that interacts with the Okta Schemas API.

Declaration
IUserSchemasClient UserSchemas { get; }
Property Value
Type Description
IUserSchemasClient

An ILinkedObjectsClient that interacts with the Okta Schemas API.

UserTypes

Gets a IUserTypesClient that interacts with the Okta User Types API.

Declaration
IUserTypesClient UserTypes { get; }
Property Value
Type Description
IUserTypesClient

A IUserTypesClient that interacts with the Okta User Types API.

Methods

CreateScoped(RequestContext)

Creates a new IOktaClient scoped to the given request context.

Declaration
IOktaClient CreateScoped(RequestContext requestContext)
Parameters
Type Name Description
RequestContext requestContext

The request context

Returns
Type Description
IOktaClient

The new client.

Remarks

This method is used to temporarily create a copy of the client in order to pass information about the current request to the Okta API.

DeleteAsync(HttpRequest, CancellationToken)

Deletes a resource by specifying the HTTP request options.

Declaration
Task DeleteAsync(HttpRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
HttpRequest request

The request options.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

Remarks

You typically only need to use this method if you are working with resources not natively handled by this library.

Exceptions
Type Condition
OktaApiException

An API error occurred.

DeleteAsync(String, CancellationToken)

Deletes a resource by URL.

Declaration
Task DeleteAsync(string href, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String href

The resource URL.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

Remarks

You typically only need to use this method if you are working with resources not natively handled by this library.

Exceptions
Type Condition
OktaApiException

An API error occurred.

GetAsync<T>(HttpRequest, CancellationToken)

Gets a resource by specifying the HTTP request options, and deserializes it to a Resource type.

Declaration
Task<T> GetAsync<T>(HttpRequest request, CancellationToken cancellationToken = default(CancellationToken))
    where T : Resource, new()
Parameters
Type Name Description
HttpRequest request

The request options.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<T>

The deserialized resource.

Type Parameters
Name Description
T

The Resource type to deserialize the returned data to.

Remarks

You typically only need to use this method if you are working with resources not natively handled by this library.

Exceptions
Type Condition
OktaApiException

An API error occurred.

GetAsync<T>(String, CancellationToken)

Gets a resource by URL and deserializes it to a Resource type.

Declaration
Task<T> GetAsync<T>(string href, CancellationToken cancellationToken = default(CancellationToken))
    where T : Resource, new()
Parameters
Type Name Description
System.String href

The resource URL.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<T>

The deserialized resource.

Type Parameters
Name Description
T

The Resource type to deserialize the returned data to.

Remarks

You typically only need to use this method if you are working with resources not natively handled by this library.

Exceptions
Type Condition
OktaApiException

An API error occurred.

GetCollection<T>(HttpRequest)

Gets a collection of resources from the Okta API by URL.

Declaration
CollectionClient<T> GetCollection<T>(HttpRequest request)
    where T : IResource
Parameters
Type Name Description
HttpRequest request

The request options.

Returns
Type Description
CollectionClient<T>

A collection that can be enumerated asynchronously.

Type Parameters
Name Description
T

The Resource type of the collection.

GetCollection<T>(String)

Gets a collection of resources from the Okta API by URL.

Declaration
CollectionClient<T> GetCollection<T>(string href)
    where T : IResource
Parameters
Type Name Description
System.String href

The collection URL.

Returns
Type Description
CollectionClient<T>

A collection that can be enumerated asynchronously.

Type Parameters
Name Description
T

The Resource type of the collection.

PostAsync(HttpRequest, CancellationToken)

Posts data to an endpoint by specifying the HTTP request options.

Declaration
Task PostAsync(HttpRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
HttpRequest request

The request options.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

Remarks

You typically only need to use this method if you are working with resources not natively handled by this library.

Exceptions
Type Condition
OktaApiException

An API error occurred.

PostAsync(String, Object, CancellationToken)

Posts data to an endpoint by URL.

Declaration
Task PostAsync(string href, object model, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String href

The endpoint URL.

System.Object model

The data to serialize and attach to the request body.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

Remarks

You typically only need to use this method if you are working with resources not natively handled by this library.

Exceptions
Type Condition
OktaApiException

An API error occurred.

PostAsync<TResponse>(HttpRequest, CancellationToken)

Posts data to an endpoint by specifying the HTTP request options, and deserializes the response payload to a Resource type.

Declaration
Task<TResponse> PostAsync<TResponse>(HttpRequest request, CancellationToken cancellationToken = default(CancellationToken))
    where TResponse : Resource, new()
Parameters
Type Name Description
HttpRequest request

The request options.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<TResponse>

The deserialized response data.

Type Parameters
Name Description
TResponse

The Resource type to deserialize the returned data to.

Remarks

You typically only need to use this method if you are working with resources not natively handled by this library.

Exceptions
Type Condition
OktaApiException

An API error occurred.

PostAsync<TResponse>(String, Object, CancellationToken)

Posts data to an endpoint by URL, and deserializes the response payload to a Resource type.

Declaration
Task<TResponse> PostAsync<TResponse>(string href, object model, CancellationToken cancellationToken = default(CancellationToken))
    where TResponse : Resource, new()
Parameters
Type Name Description
System.String href

The endpoint URL.

System.Object model

The data to serialize and attach to the request body.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<TResponse>

The deserialized response data.

Type Parameters
Name Description
TResponse

The Resource type to deserialize the returned data to.

Remarks

You typically only need to use this method if you are working with resources not natively handled by this library.

Exceptions
Type Condition
OktaApiException

An API error occurred.

PutAsync(HttpRequest, CancellationToken)

Puts data to an endpoint by specifying the HTTP request options.

Declaration
Task PutAsync(HttpRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
HttpRequest request

The endpoint URL.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

Remarks

You typically only need to use this method if you are working with resources not natively handled by this library.

Exceptions
Type Condition
OktaApiException

An API error occurred.

PutAsync(String, Object, CancellationToken)

Puts data to an endpoint by URL.

Declaration
Task PutAsync(string href, object model, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String href

The endpoint URL.

System.Object model

The data to serialize and attach to the request body.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

Remarks

You typically only need to use this method if you are working with resources not natively handled by this library.

Exceptions
Type Condition
OktaApiException

An API error occurred.

PutAsync<TResponse>(HttpRequest, CancellationToken)

Puts data to an endpoint by specifying the HTTP request options, and deserializes the response payload to a Resource type.

Declaration
Task<TResponse> PutAsync<TResponse>(HttpRequest request, CancellationToken cancellationToken = default(CancellationToken))
    where TResponse : Resource, new()
Parameters
Type Name Description
HttpRequest request

The request options.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<TResponse>

The deserialized response data.

Type Parameters
Name Description
TResponse

The Resource type to deserialize the returned data to.

Remarks

You typically only need to use this method if you are working with resources not natively handled by this library.

Exceptions
Type Condition
OktaApiException

An API error occurred.

PutAsync<TResponse>(String, Object, CancellationToken)

Puts data to an endpoint by URL and deserializes the response payload to a Resource type. You typically only need to use this method if you are working with resources not natively handled by this library.

Declaration
Task<TResponse> PutAsync<TResponse>(string href, object model, CancellationToken cancellationToken = default(CancellationToken))
    where TResponse : Resource, new()
Parameters
Type Name Description
System.String href

The endpoint URL.

System.Object model

The data to serialize and attach to the request body.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<TResponse>

The deserialized response data.

Type Parameters
Name Description
TResponse

The Resource type to deserialize the returned data to.

Exceptions
Type Condition
OktaApiException

An API error occurred.

Back to top Copyright © 2021 Okta, Inc.
Generated with DocFx.