Okta.Sdk.Api.UserAuthenticatorEnrollmentsApi

October 22, 2025 ยท View on GitHub

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

MethodHTTP requestDescription
CreateAuthenticatorEnrollmentPOST /api/v1/users/{userId}/authenticator-enrollments/phoneCreate an auto-activated Phone authenticator enrollment
CreateTacAuthenticatorEnrollmentPOST /api/v1/users/{userId}/authenticator-enrollments/tacCreate an auto-activated TAC authenticator enrollment
DeleteAuthenticatorEnrollmentDELETE /api/v1/users/{userId}/authenticator-enrollments/{enrollmentId}Delete an authenticator enrollment
GetAuthenticatorEnrollmentGET /api/v1/users/{userId}/authenticator-enrollments/{enrollmentId}Retrieve an authenticator enrollment
ListAuthenticatorEnrollmentsGET /api/v1/users/{userId}/authenticator-enrollmentsList all authenticator enrollments

CreateAuthenticatorEnrollment

AuthenticatorEnrollment CreateAuthenticatorEnrollment (string userId, AuthenticatorEnrollmentCreateRequest authenticator)

Create an auto-activated Phone authenticator enrollment

Creates a Phone authenticator enrollment that's automatically activated

Example

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

namespace Example
{
    public class CreateAuthenticatorEnrollmentExample
    {
        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 UserAuthenticatorEnrollmentsApi(config);
            var userId = 00ub0oNGTSWTBKOLGLNR;  // string | ID of an existing Okta user
            var authenticator = new AuthenticatorEnrollmentCreateRequest(); // AuthenticatorEnrollmentCreateRequest | 

            try
            {
                // Create an auto-activated Phone authenticator enrollment
                AuthenticatorEnrollment result = apiInstance.CreateAuthenticatorEnrollment(userId, authenticator);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling UserAuthenticatorEnrollmentsApi.CreateAuthenticatorEnrollment: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
userIdstringID of an existing Okta user
authenticatorAuthenticatorEnrollmentCreateRequest

Return type

AuthenticatorEnrollment

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]

CreateTacAuthenticatorEnrollment

TacAuthenticatorEnrollment CreateTacAuthenticatorEnrollment (string userId, AuthenticatorEnrollmentCreateRequestTac authenticator)

Create an auto-activated TAC authenticator enrollment

Creates an auto-activated Temporary access code (TAC) authenticator enrollment

Example

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

namespace Example
{
    public class CreateTacAuthenticatorEnrollmentExample
    {
        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 UserAuthenticatorEnrollmentsApi(config);
            var userId = 00ub0oNGTSWTBKOLGLNR;  // string | ID of an existing Okta user
            var authenticator = new AuthenticatorEnrollmentCreateRequestTac(); // AuthenticatorEnrollmentCreateRequestTac | 

            try
            {
                // Create an auto-activated TAC authenticator enrollment
                TacAuthenticatorEnrollment result = apiInstance.CreateTacAuthenticatorEnrollment(userId, authenticator);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling UserAuthenticatorEnrollmentsApi.CreateTacAuthenticatorEnrollment: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
userIdstringID of an existing Okta user
authenticatorAuthenticatorEnrollmentCreateRequestTac

Return type

TacAuthenticatorEnrollment

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]

DeleteAuthenticatorEnrollment

void DeleteAuthenticatorEnrollment (string userId, string enrollmentId)

Delete an authenticator enrollment

Deletes an existing enrollment for the specified user. The user can enroll the authenticator again.

Example

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

namespace Example
{
    public class DeleteAuthenticatorEnrollmentExample
    {
        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 UserAuthenticatorEnrollmentsApi(config);
            var userId = 00ub0oNGTSWTBKOLGLNR;  // string | ID of an existing Okta user
            var enrollmentId = sms8lqwuzSpWT4kVs0g4;  // string | Unique identifier of an enrollment

            try
            {
                // Delete an authenticator enrollment
                apiInstance.DeleteAuthenticatorEnrollment(userId, enrollmentId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling UserAuthenticatorEnrollmentsApi.DeleteAuthenticatorEnrollment: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
userIdstringID of an existing Okta user
enrollmentIdstringUnique identifier of an enrollment

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]

GetAuthenticatorEnrollment

AuthenticatorEnrollment GetAuthenticatorEnrollment (string userId, string enrollmentId)

Retrieve an authenticator enrollment

Retrieves a user's authenticator enrollment by enrollmentId

Example

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

namespace Example
{
    public class GetAuthenticatorEnrollmentExample
    {
        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 UserAuthenticatorEnrollmentsApi(config);
            var userId = 00ub0oNGTSWTBKOLGLNR;  // string | ID of an existing Okta user
            var enrollmentId = sms8lqwuzSpWT4kVs0g4;  // string | Unique identifier of an enrollment

            try
            {
                // Retrieve an authenticator enrollment
                AuthenticatorEnrollment result = apiInstance.GetAuthenticatorEnrollment(userId, enrollmentId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling UserAuthenticatorEnrollmentsApi.GetAuthenticatorEnrollment: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
userIdstringID of an existing Okta user
enrollmentIdstringUnique identifier of an enrollment

Return type

AuthenticatorEnrollment

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]

ListAuthenticatorEnrollments

AuthenticatorEnrollment ListAuthenticatorEnrollments (string userId)

List all authenticator enrollments

Lists all authenticator enrollments of the specified user

Example

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

namespace Example
{
    public class ListAuthenticatorEnrollmentsExample
    {
        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 UserAuthenticatorEnrollmentsApi(config);
            var userId = 00ub0oNGTSWTBKOLGLNR;  // string | ID of an existing Okta user

            try
            {
                // List all authenticator enrollments
                AuthenticatorEnrollment result = apiInstance.ListAuthenticatorEnrollments(userId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling UserAuthenticatorEnrollmentsApi.ListAuthenticatorEnrollments: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
userIdstringID of an existing Okta user

Return type

AuthenticatorEnrollment

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]