Hello,
Welcome to Microsoft Q&A!
As far as I'm concerned, if you want to implement a two-factor authentication, you need implement a credential provider. You could try to ask for sms/pin after the user clicked on the submit button. In the GetSerialization function, you could realize this by creating a new window that ask the sms/pin.
I suggest you could refer to the links: https://stackoverflow.com/questions/47401427/windows-credential-provider-implementation https://learn.microsoft.com/en-us/windows/win32/secauthn/winlogon-and-credential-providers?redirectedfrom=MSDN
Thank you.
Jeanine
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.