Okta.Sdk.Api.IdentitySourceApi

October 22, 2025 ยท View on GitHub

All URIs are relative to https://subdomain.okta.com

MethodHTTP requestDescription
CreateIdentitySourceSessionPOST /api/v1/identity-sources/{identitySourceId}/sessionsCreate an identity source session
DeleteIdentitySourceSessionDELETE /api/v1/identity-sources/{identitySourceId}/sessions/{sessionId}Delete an identity source session
GetIdentitySourceSessionGET /api/v1/identity-sources/{identitySourceId}/sessions/{sessionId}Retrieve an identity source session
ListIdentitySourceSessionsGET /api/v1/identity-sources/{identitySourceId}/sessionsList all identity source sessions
StartImportFromIdentitySourcePOST /api/v1/identity-sources/{identitySourceId}/sessions/{sessionId}/start-importStart the import from the identity source
UploadIdentitySourceDataForDeletePOST /api/v1/identity-sources/{identitySourceId}/sessions/{sessionId}/bulk-deleteUpload the data to be deleted in Okta
UploadIdentitySourceDataForUpsertPOST /api/v1/identity-sources/{identitySourceId}/sessions/{sessionId}/bulk-upsertUpload the data to be upserted in Okta

CreateIdentitySourceSession

IdentitySourceSession CreateIdentitySourceSession (string identitySourceId)

Create an identity source session

Creates an identity source session for the given identity source instance

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class CreateIdentitySourceSessionExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new IdentitySourceApi(config);
            var identitySourceId = 0oa3l6l6WK6h0R0QW0g4;  // string | The ID of the identity source for which the session is created

            try
            {
                // Create an identity source session
                IdentitySourceSession result = apiInstance.CreateIdentitySourceSession(identitySourceId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IdentitySourceApi.CreateIdentitySourceSession: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
identitySourceIdstringThe ID of the identity source for which the session is created

Return type

IdentitySourceSession

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Success-
403Forbidden-
404Not Found-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteIdentitySourceSession

void DeleteIdentitySourceSession (string identitySourceId, string sessionId)

Delete an identity source session

Deletes an identity source session for a given identity source ID and session Id

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class DeleteIdentitySourceSessionExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new IdentitySourceApi(config);
            var identitySourceId = 0oa3l6l6WK6h0R0QW0g4;  // string | The ID of the identity source for which the session is created
            var sessionId = aps1qqonvr2SZv6o70h8;  // string | The ID of the identity source session

            try
            {
                // Delete an identity source session
                apiInstance.DeleteIdentitySourceSession(identitySourceId, sessionId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IdentitySourceApi.DeleteIdentitySourceSession: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
identitySourceIdstringThe ID of the identity source for which the session is created
sessionIdstringThe ID of the identity source session

Return type

void (empty response body)

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
204No Content-
403Forbidden-
404Not Found-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetIdentitySourceSession

IdentitySourceSession GetIdentitySourceSession (string identitySourceId, string sessionId)

Retrieve an identity source session

Retrieves an identity source session for a given identity source ID and session ID

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class GetIdentitySourceSessionExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new IdentitySourceApi(config);
            var identitySourceId = 0oa3l6l6WK6h0R0QW0g4;  // string | The ID of the identity source for which the session is created
            var sessionId = aps1qqonvr2SZv6o70h8;  // string | The ID of the identity source session

            try
            {
                // Retrieve an identity source session
                IdentitySourceSession result = apiInstance.GetIdentitySourceSession(identitySourceId, sessionId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IdentitySourceApi.GetIdentitySourceSession: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
identitySourceIdstringThe ID of the identity source for which the session is created
sessionIdstringThe ID of the identity source session

Return type

IdentitySourceSession

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Success-
403Forbidden-
404Not Found-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListIdentitySourceSessions

List<IdentitySourceSession> ListIdentitySourceSessions (string identitySourceId)

List all identity source sessions

Lists all identity source sessions for the given identity source instance

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class ListIdentitySourceSessionsExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new IdentitySourceApi(config);
            var identitySourceId = 0oa3l6l6WK6h0R0QW0g4;  // string | The ID of the identity source for which the session is created

            try
            {
                // List all identity source sessions
                List<IdentitySourceSession> result = apiInstance.ListIdentitySourceSessions(identitySourceId).ToListAsync();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IdentitySourceApi.ListIdentitySourceSessions: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
identitySourceIdstringThe ID of the identity source for which the session is created

Return type

List<IdentitySourceSession>

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Success-
403Forbidden-
404Not Found-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

StartImportFromIdentitySource

IdentitySourceSession StartImportFromIdentitySource (string identitySourceId, string sessionId)

Start the import from the identity source

Starts the import from the identity source described by the uploaded bulk operations

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class StartImportFromIdentitySourceExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new IdentitySourceApi(config);
            var identitySourceId = 0oa3l6l6WK6h0R0QW0g4;  // string | The ID of the identity source for which the session is created
            var sessionId = aps1qqonvr2SZv6o70h8;  // string | The ID of the identity source session

            try
            {
                // Start the import from the identity source
                IdentitySourceSession result = apiInstance.StartImportFromIdentitySource(identitySourceId, sessionId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IdentitySourceApi.StartImportFromIdentitySource: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
identitySourceIdstringThe ID of the identity source for which the session is created
sessionIdstringThe ID of the identity source session

Return type

IdentitySourceSession

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Success-
403Forbidden-
404Not Found-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UploadIdentitySourceDataForDelete

void UploadIdentitySourceDataForDelete (string identitySourceId, string sessionId, BulkDeleteRequestBody bulkDeleteRequestBody = null)

Upload the data to be deleted in Okta

Uploads external IDs of entities that need to be deleted in Okta from the identity source for the given session

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class UploadIdentitySourceDataForDeleteExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new IdentitySourceApi(config);
            var identitySourceId = 0oa3l6l6WK6h0R0QW0g4;  // string | The ID of the identity source for which the session is created
            var sessionId = aps1qqonvr2SZv6o70h8;  // string | The ID of the identity source session
            var bulkDeleteRequestBody = new BulkDeleteRequestBody(); // BulkDeleteRequestBody |  (optional) 

            try
            {
                // Upload the data to be deleted in Okta
                apiInstance.UploadIdentitySourceDataForDelete(identitySourceId, sessionId, bulkDeleteRequestBody);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IdentitySourceApi.UploadIdentitySourceDataForDelete: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
identitySourceIdstringThe ID of the identity source for which the session is created
sessionIdstringThe ID of the identity source session
bulkDeleteRequestBodyBulkDeleteRequestBody[optional]

Return type

void (empty response body)

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
202Accepted-
400Bad Request-
403Forbidden-
404Not Found-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UploadIdentitySourceDataForUpsert

void UploadIdentitySourceDataForUpsert (string identitySourceId, string sessionId, BulkUpsertRequestBody bulkUpsertRequestBody = null)

Upload the data to be upserted in Okta

Uploads entities that need to be inserted or updated in Okta from the identity source for the given session

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class UploadIdentitySourceDataForUpsertExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new IdentitySourceApi(config);
            var identitySourceId = 0oa3l6l6WK6h0R0QW0g4;  // string | The ID of the identity source for which the session is created
            var sessionId = aps1qqonvr2SZv6o70h8;  // string | The ID of the identity source session
            var bulkUpsertRequestBody = new BulkUpsertRequestBody(); // BulkUpsertRequestBody |  (optional) 

            try
            {
                // Upload the data to be upserted in Okta
                apiInstance.UploadIdentitySourceDataForUpsert(identitySourceId, sessionId, bulkUpsertRequestBody);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IdentitySourceApi.UploadIdentitySourceDataForUpsert: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
identitySourceIdstringThe ID of the identity source for which the session is created
sessionIdstringThe ID of the identity source session
bulkUpsertRequestBodyBulkUpsertRequestBody[optional]

Return type

void (empty response body)

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
202Accepted-
400Bad Request-
403Forbidden-
404Not Found-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]