Okta.Sdk.Api.AuthorizationServerClaimsApi
October 22, 2025 ยท View on GitHub
All URIs are relative to https://subdomain.okta.com
| Method | HTTP request | Description |
|---|---|---|
| CreateOAuth2Claim | POST /api/v1/authorizationServers/{authServerId}/claims | Create a custom token claim |
| DeleteOAuth2Claim | DELETE /api/v1/authorizationServers/{authServerId}/claims/{claimId} | Delete a custom token claim |
| GetOAuth2Claim | GET /api/v1/authorizationServers/{authServerId}/claims/{claimId} | Retrieve a custom token claim |
| ListOAuth2Claims | GET /api/v1/authorizationServers/{authServerId}/claims | List all custom token claims |
| ReplaceOAuth2Claim | PUT /api/v1/authorizationServers/{authServerId}/claims/{claimId} | Replace a custom token claim |
CreateOAuth2Claim
OAuth2Claim CreateOAuth2Claim (string authServerId, OAuth2Claim oAuth2Claim)
Create a custom token claim
Creates a custom token Claim for a custom authorization server
Example
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class CreateOAuth2ClaimExample
{
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 AuthorizationServerClaimsApi(config);
var authServerId = GeGRTEr7f3yu2n7grw22; // string | `id` of the Authorization Server
var oAuth2Claim = new OAuth2Claim(); // OAuth2Claim |
try
{
// Create a custom token claim
OAuth2Claim result = apiInstance.CreateOAuth2Claim(authServerId, oAuth2Claim);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AuthorizationServerClaimsApi.CreateOAuth2Claim: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| authServerId | string | `id` of the Authorization Server | |
| oAuth2Claim | OAuth2Claim |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 201 | Success | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteOAuth2Claim
void DeleteOAuth2Claim (string authServerId, string claimId)
Delete a custom token claim
Deletes a custom token Claim specified by the claimId
Example
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteOAuth2ClaimExample
{
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 AuthorizationServerClaimsApi(config);
var authServerId = GeGRTEr7f3yu2n7grw22; // string | `id` of the Authorization Server
var claimId = hNJ3Uk76xLagWkGx5W3N; // string | `id` of Claim
try
{
// Delete a custom token claim
apiInstance.DeleteOAuth2Claim(authServerId, claimId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AuthorizationServerClaimsApi.DeleteOAuth2Claim: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| authServerId | string | `id` of the Authorization Server | |
| claimId | string | `id` of Claim |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 204 | No Content | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetOAuth2Claim
OAuth2Claim GetOAuth2Claim (string authServerId, string claimId)
Retrieve a custom token claim
Retrieves a custom token Claim by the specified claimId
Example
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetOAuth2ClaimExample
{
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 AuthorizationServerClaimsApi(config);
var authServerId = GeGRTEr7f3yu2n7grw22; // string | `id` of the Authorization Server
var claimId = hNJ3Uk76xLagWkGx5W3N; // string | `id` of Claim
try
{
// Retrieve a custom token claim
OAuth2Claim result = apiInstance.GetOAuth2Claim(authServerId, claimId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AuthorizationServerClaimsApi.GetOAuth2Claim: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| authServerId | string | `id` of the Authorization Server | |
| claimId | string | `id` of Claim |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListOAuth2Claims
List<OAuth2Claim> ListOAuth2Claims (string authServerId)
List all custom token claims
Lists all custom token Claims defined for a specified custom authorization server
Example
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListOAuth2ClaimsExample
{
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 AuthorizationServerClaimsApi(config);
var authServerId = GeGRTEr7f3yu2n7grw22; // string | `id` of the Authorization Server
try
{
// List all custom token claims
List<OAuth2Claim> result = apiInstance.ListOAuth2Claims(authServerId).ToListAsync();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AuthorizationServerClaimsApi.ListOAuth2Claims: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| authServerId | string | `id` of the Authorization Server |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReplaceOAuth2Claim
OAuth2Claim ReplaceOAuth2Claim (string authServerId, string claimId, OAuth2Claim oAuth2Claim)
Replace a custom token claim
Replaces a custom token Claim specified by the claimId
Example
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ReplaceOAuth2ClaimExample
{
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 AuthorizationServerClaimsApi(config);
var authServerId = GeGRTEr7f3yu2n7grw22; // string | `id` of the Authorization Server
var claimId = hNJ3Uk76xLagWkGx5W3N; // string | `id` of Claim
var oAuth2Claim = new OAuth2Claim(); // OAuth2Claim |
try
{
// Replace a custom token claim
OAuth2Claim result = apiInstance.ReplaceOAuth2Claim(authServerId, claimId, oAuth2Claim);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AuthorizationServerClaimsApi.ReplaceOAuth2Claim: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| authServerId | string | `id` of the Authorization Server | |
| claimId | string | `id` of Claim | |
| oAuth2Claim | OAuth2Claim |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]