MFA does not redirect to login portal when using external service to Send OTP

We are using basic Authentication and enabled MFA in it and calling external API to Send OTP to user to login.

Even though user enter correct “OTP”, PEGA is not re-directing for login instead it is sending OTP once again.

We have customized pyValidateOTPExternal to set the proper “pyOTPStatusCode” and value is set to E000

@VamshiKrishn_Nookala You said, you configured MFA, and it is asking for the verification even after entering the correct password
This is expected,
Adding MFA to the security policy tab of any of the authentication service will just enable that policy to the auth service that you are using at current.
And this MFA is just another layer of security, and it will request you to enter code even if you enter password correct.
Please correct me if I am understanding your issue, is a wrong perspective.
Thank you!

@Manojkumar_ J Thanks for the reply Manoj, but there is a typo, please read as “Even though user enter correct OTP”.

And this issue is solved, the problem is with pyOTPStatus value, we have set it as “Success” instead of “SUCCESS”, PEGA is expecting to be “SUCCESS” and it is not re-directing to portal. We have fixed it by setting to “SUCCESS”.