Multi-Factor Authentication (MFA).

You can now use XrmToolkit with MFA enabled Dynamics 365 organizations. There are 2 methods outlined below for being able to authenticate when MFA is enabled.

Azure Application Registration

You can try the following for your 'App Id' and 'Return URL'

  • AppId: 51f81489-12ee-4a9e-aaae-a2591f45987d
  • Return URL: app://58145B91-0C36-4500-8554-080854F2AC97
Or...
  • App Id: 2ad88395-b77d-4561-9441-d0e40824f9bc
  • Return URL: app://5d3e90d6-aa8e-48a8-8f2c-58b45cc67315

These values should be global to all CRM online instances.

Alternatively, if you can register your own app in Azure. An excellent article can be found here for configuring an Azure Application that can be used for MFA authentication.

Once your Azure App has been registered, you can specify the 'MFA App Id' and 'MFA Return Url' in the new 'Advanced' tab on the authentication dialog:


Note:
For some MFA scenarios (including manual prompts) you may need to resort to using a connection string. Starting with v6.4 you can now specify a connection string for connecting to your organization. For more information regarding connection strings please see the documentation from Microsoft here.

Using Azure App Passwords

Another option when MFA is enabled is to use Azure App Passwords instead of your regular password. This can be accomplished by following the details here: Azure App Passwords. After creating a new password, use this as your password in the authentication dialogs in XrmToolkit.