<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Enrolling and Activating Okta Factors via API
Okta Classic Engine
Multi-Factor Authentication
Okta Identity Engine
Overview

Administrators often need to enroll and activate different Okta factors programmatically. Okta provides specific API endpoints and JSON payloads to enroll and auto-activate factors such as email, SMS, voice call, and security questions for a user.

Applies To
  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • API
  • Multi-Factor Authentication (MFA)
  • Factor Enrollment
Solution

What are the steps to enroll and activate Okta factors via API?

 

To enroll and auto-activate a factor for a user, execute a POST request to the factors API endpoint using the appropriate JSON body for the desired factor type.

 
https://<OktaDomainName>/api/v1/users/<userId>/factors?activate=true

 

The same API endpoint processes the request, but the JSON body differs based on the specific factor. For a comprehensive list of available factors and the necessary JSON body for each, refer to Enroll a factor.

 

Below is a JSON example for the Email factor and a screenshot of a populated request body.

{
  "factorType": "email",
  "provider": "OKTA",
  "profile": {
    "email": "test@email.com "
  }
}

 

 Postman API call

 

    Related References

     

    Loading
    Enrolling and Activating Okta Factors via API