How to authenticate a user through API when MFA is enabled? Authenticate API returns status as "MFA_REQUIRED" Skip to main content
https://support.okta.com/help/answers?id=906f0000000i01fiac&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Dheeraj GuptaDheeraj Gupta 

How to authenticate a user through API when MFA is enabled? Authenticate API returns status as "MFA_REQUIRED"

Thomas KirkThomas Kirk (Okta, Inc.)
Take a look at the State Diagram for authentication: http://developer.okta.com/docs/api/resources/authn.html#transaction-state

If MFA_REQUIRED is the returned status, then you will need to prompt the user for MFA.
Wils DawsonWils Dawson (Okta, Inc.)
Hi Dheeraj,

Please see our developer docs: http://developer.okta.com/docs/api/resources/authn.html#response-example-factor-challenge

You'll need to give the user the choice of the factors they have enrolled in and challenge the user with their choice of factor. Then submit the verification back to Okta via the verify-factor endpoint http://developer.okta.com/docs/api/resources/authn.html#verify-factor

I hope that is helpful,
Wils