Any problem with robot script doing multi-factor authentication to Microsoft Dynamics 365

Hello community!

I have an assignment to do UI test automation in Microsoft Dynamics365 customized applications. I got into a huge problem with making robot passing multi-factor authentication to get into D365 apps. My question is that has anyone encountered the same problem as I did. If so how did you succeed to do that. Thank you very much! :pray:

Hi Anh,

Solving the 2FA question always starts with how does the 2FA work? This is going to vary depending on your organisation’s security policy, is the second factor a:

  • SMS message?
  • an email?
  • an RSA key using a physical device or the RSA smart phone app?
  • a physical swipe card
  • something else

Because there are so many ways 2FA can be implemented there is no one library or way to deal with it.

If you are testing the application (Microsoft Dynamics365 in this case) and not the 2FA system, the easiest way to deal with 2FA is to have your security team disable it for your test accounts.

If you can’t simply disable 2FA for your test accounts then when you know which method is being used we can try to offer some suggestions for that delivery method.

Hope that helps,


Hello damies13,
Thanks for your response. Appreciated! I’m working with the security team at the moment. It looks like the issue is much more complicated than we thought :sweat_smile:

Hi Anh,

I’ve successfully implemented UI testing framework against MFA enabled D365 app using Browser library’s capabilities, but test user account needs to have e.g. certain session lifetime settings enabled.

I suggest you to take a look at these Browser library’s keywords:

1 Like