Bypass OTP for external idp login

Hello.

I have a requirement to allow users to switch freely from username/password authentication to Google/Microsoft authentication. Also, they need to pass OTP validation while logging into the system via username/password but OTP should be omitted when user authenticates via external idp.

Is there a way to bypass required action - OTP for external idp logins?