We are looking to integrate with a 3rd party service to check the risk score. The flow should be like, user enters the username and password, on successful authentication, a 3rd party API will be called to calculate the risk score. If result is to challenge the user then MFA will come on screen, if the result is successful then user will be logged in without MFA.
Thank you for writing in Dev Forum. My name is Akash from Okta.
For your use case, you can make use of the Primary Authentication API that allows you to validates user’s primary password credential such as username and password. The MFA will be evaluated during the Primary Authentication. You will require the user to be enrolled to a Factor in order for the user to be prompted with the MFA. Learn more - Authentication | Okta Developer