Okta.Sdk.Api.IdentityProviderKeysApi

October 22, 2025 ยท View on GitHub

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

MethodHTTP requestDescription
CreateIdentityProviderKeyPOST /api/v1/idps/credentials/keysCreate an IdP key credential
DeleteIdentityProviderKeyDELETE /api/v1/idps/credentials/keys/{kid}Delete an IdP key credential
GetIdentityProviderKeyGET /api/v1/idps/credentials/keys/{kid}Retrieve an IdP key credential
ListIdentityProviderKeysGET /api/v1/idps/credentials/keysList all IdP key credentials
ReplaceIdentityProviderKeyPUT /api/v1/idps/credentials/keys/{kid}Replace an IdP key credential

CreateIdentityProviderKey

IdPKeyCredential CreateIdentityProviderKey (IdPCertificateCredential jsonWebKey)

Create an IdP key credential

Creates a new X.509 certificate credential in the identity provider (IdP) key store > Note: RSA-based certificates are supported for all IdP types. Okta currently supports EC-based certificates only for the X509 IdP type. For EC-based certificates we support only P-256, P-384, and P-521 curves.

Example

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

namespace Example
{
    public class CreateIdentityProviderKeyExample
    {
        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 IdentityProviderKeysApi(config);
            var jsonWebKey = new IdPCertificateCredential(); // IdPCertificateCredential | 

            try
            {
                // Create an IdP key credential
                IdPKeyCredential result = apiInstance.CreateIdentityProviderKey(jsonWebKey);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IdentityProviderKeysApi.CreateIdentityProviderKey: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
jsonWebKeyIdPCertificateCredential

Return type

IdPKeyCredential

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Success-
400Bad Request-
403Forbidden-
429Too Many Requests-

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

DeleteIdentityProviderKey

void DeleteIdentityProviderKey (string kid)

Delete an IdP key credential

Deletes a specific identity provider (IdP) key credential by kid if it isn't currently being used by an active or inactive IdP

Example

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

namespace Example
{
    public class DeleteIdentityProviderKeyExample
    {
        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 IdentityProviderKeysApi(config);
            var kid = KmMo85SSsU7TZzOShcGb;  // string | Unique `id` of the IdP key credential

            try
            {
                // Delete an IdP key credential
                apiInstance.DeleteIdentityProviderKey(kid);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IdentityProviderKeysApi.DeleteIdentityProviderKey: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
kidstringUnique `id` of the IdP key credential

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]

GetIdentityProviderKey

IdPKeyCredential GetIdentityProviderKey (string kid)

Retrieve an IdP key credential

Retrieves a specific identity provider (IdP) key credential by kid

Example

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

namespace Example
{
    public class GetIdentityProviderKeyExample
    {
        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 IdentityProviderKeysApi(config);
            var kid = KmMo85SSsU7TZzOShcGb;  // string | Unique `id` of the IdP key credential

            try
            {
                // Retrieve an IdP key credential
                IdPKeyCredential result = apiInstance.GetIdentityProviderKey(kid);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IdentityProviderKeysApi.GetIdentityProviderKey: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
kidstringUnique `id` of the IdP key credential

Return type

IdPKeyCredential

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]

ListIdentityProviderKeys

List<IdPKeyCredential> ListIdentityProviderKeys (string after = null, int? limit = null)

List all IdP key credentials

Lists all identity provider (IdP) key credentials

Example

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

namespace Example
{
    public class ListIdentityProviderKeysExample
    {
        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 IdentityProviderKeysApi(config);
            var after = "after_example";  // string | The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination). (optional) 
            var limit = 20;  // int? | A limit on the number of objects to return (optional)  (default to 20)

            try
            {
                // List all IdP key credentials
                List<IdPKeyCredential> result = apiInstance.ListIdentityProviderKeys(after, limit).ToListAsync();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IdentityProviderKeysApi.ListIdentityProviderKeys: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
afterstringThe cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See Pagination.[optional]
limitint?A limit on the number of objects to return[optional] [default to 20]

Return type

List<IdPKeyCredential>

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

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

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

ReplaceIdentityProviderKey

IdPKeyCredential ReplaceIdentityProviderKey (string kid, Dictionary<string, Object> requestBody)

Replace an IdP key credential

Replaces an identity provider (IdP) key credential by kid

Example

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

namespace Example
{
    public class ReplaceIdentityProviderKeyExample
    {
        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 IdentityProviderKeysApi(config);
            var kid = KmMo85SSsU7TZzOShcGb;  // string | Unique `id` of the IdP key credential
            var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | Updated IdP key credential

            try
            {
                // Replace an IdP key credential
                IdPKeyCredential result = apiInstance.ReplaceIdentityProviderKey(kid, requestBody);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IdentityProviderKeysApi.ReplaceIdentityProviderKey: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
kidstringUnique `id` of the IdP key credential
requestBodyDictionary<string, Object>Updated IdP key credential

Return type

IdPKeyCredential

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

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

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