API to enroll factor results in HTTP 400 - Api validation failed: factorEnrollRequest

Hello,

I am using an API to register a SMS factor on a user profile.
I post the following API request to the following address :

https://$oktadomain/api/v1/users/$userId/factors
{
   "factorType":"sms",
   "provider":"OKTA",
   "profile":{
      "phoneNumber":"validPhoneNumber"
    }
}

I use an Okta dev tenant, and an Okta UAT tenant.
The API works fine on the test tenant and I get an OTP by SMS.

On the UAT Tenant, I get the following error:

400 - Bad Request {"errorCode":"E0000001","errorSummary":"Api validation failed: factorEnrollRequest","errorLink":"E0000001","errorId":"oaeX8UKtPFSRJOmp64Yth2UAQ","errorCauses":[{"errorSummary":"Factor not enabled."}]}

Can you help me understand what is going wrong on the UAT Okta Tenant?

Thanks!

Based on the error, you might want to make sure that SMS factor is enabled in your Okta org.
https://help.okta.com/en-us/Content/Topics/Security/mfa/sms.htm

1 Like

Thanks, I will ask the admins to check.

you were right, thanks!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.