Okta.Sdk.Api.ApplicationSSOApi

October 22, 2025 ยท View on GitHub

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

MethodHTTP requestDescription
PreviewSAMLmetadataForApplicationGET /api/v1/apps/{appId}/sso/saml/metadataPreview the application SAML metadata

PreviewSAMLmetadataForApplication

string PreviewSAMLmetadataForApplication (string appId, string kid)

Preview the application SAML metadata

Previews the SSO SAML metadata for an application

Example

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

namespace Example
{
    public class PreviewSAMLmetadataForApplicationExample
    {
        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 ApplicationSSOApi(config);
            var appId = 0oafxqCAJWWGELFTYASJ;  // string | Application ID
            var kid = mXtzOtml09Dg1ZCeKxTRBo3KrQuBWFkJ5oxhVagjTzo;  // string | 

            try
            {
                // Preview the application SAML metadata
                string result = apiInstance.PreviewSAMLmetadataForApplication(appId, kid);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ApplicationSSOApi.PreviewSAMLmetadataForApplication: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
appIdstringApplication ID
kidstring

Return type

string

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/xml, application/json

HTTP response details

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

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