Okta.Sdk.Api.ProfileMappingApi

October 22, 2025 ยท View on GitHub

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

MethodHTTP requestDescription
GetProfileMappingGET /api/v1/mappings/{mappingId}Retrieve a profile mapping
ListProfileMappingsGET /api/v1/mappingsList all profile mappings
UpdateProfileMappingPOST /api/v1/mappings/{mappingId}Update a profile mapping

GetProfileMapping

ProfileMapping GetProfileMapping (string mappingId)

Retrieve a profile mapping

Retrieves a single profile mapping referenced by its 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 GetProfileMappingExample
    {
        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 ProfileMappingApi(config);
            var mappingId = cB6u7X8mptebWkffatKA;  // string | `id` of the Mapping

            try
            {
                // Retrieve a profile mapping
                ProfileMapping result = apiInstance.GetProfileMapping(mappingId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProfileMappingApi.GetProfileMapping: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
mappingIdstring`id` of the Mapping

Return type

ProfileMapping

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]

ListProfileMappings

List<ListProfileMappings> ListProfileMappings (string after = null, int? limit = null, string sourceId = null, string targetId = null)

List all profile mappings

Lists all profile mappings in your org with pagination. You can return a subset of profile mappings that match a supported sourceId and/or targetId. The results are paginated according to the limit parameter. If there are multiple pages of results, the Link header contains a next link that you should treat as an opaque value (follow it, don't parse it). See Link Header. The response is a collection of profile mappings that include a subset of the profile mapping object's parameters. The profile mapping object describes the properties mapping between an Okta user and an app user profile using JSON Schema Draft 4.

Example

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

namespace Example
{
    public class ListProfileMappingsExample
    {
        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 ProfileMappingApi(config);
            var after = "after_example";  // string | Mapping `id` that specifies the pagination cursor for the next page of mappings (optional) 
            var limit = 20;  // int? | Specifies the number of results per page (optional)  (default to 20)
            var sourceId = "sourceId_example";  // string | The user type or app instance ID that acts as the source of expressions in a mapping. If this parameter is included, all returned mappings have this as their `source.id`. (optional) 
            var targetId = "targetId_example";  // string | The user type or app instance ID that acts as the target of expressions in a mapping. If this parameter is included, all returned mappings have this as their `target.id`. (optional) 

            try
            {
                // List all profile mappings
                List<ListProfileMappings> result = apiInstance.ListProfileMappings(after, limit, sourceId, targetId).ToListAsync();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProfileMappingApi.ListProfileMappings: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
afterstringMapping `id` that specifies the pagination cursor for the next page of mappings[optional]
limitint?Specifies the number of results per page[optional] [default to 20]
sourceIdstringThe user type or app instance ID that acts as the source of expressions in a mapping. If this parameter is included, all returned mappings have this as their `source.id`.[optional]
targetIdstringThe user type or app instance ID that acts as the target of expressions in a mapping. If this parameter is included, all returned mappings have this as their `target.id`.[optional]

Return type

List<ListProfileMappings>

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]

UpdateProfileMapping

ProfileMapping UpdateProfileMapping (string mappingId, ProfileMappingRequest profileMapping)

Update a profile mapping

Updates an existing profile mapping by adding, updating, or removing one or many property mappings

Example

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

namespace Example
{
    public class UpdateProfileMappingExample
    {
        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 ProfileMappingApi(config);
            var mappingId = cB6u7X8mptebWkffatKA;  // string | `id` of the Mapping
            var profileMapping = new ProfileMappingRequest(); // ProfileMappingRequest | 

            try
            {
                // Update a profile mapping
                ProfileMapping result = apiInstance.UpdateProfileMapping(mappingId, profileMapping);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProfileMappingApi.UpdateProfileMapping: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
mappingIdstring`id` of the Mapping
profileMappingProfileMappingRequest

Return type

ProfileMapping

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]