knowledgecenter-breadcrum

Knowledge Center

09 Oct, 2019

Programmatically authenticate multi-factor enabled Dynamics 365 CRM environment

Posted on 09 Oct, 2019 by Admin, Posted in Dynamics 365

Programmatically authenticate multi-factor enabled Dynamics 365 CRM environment Blogs

Programmatically authenticate multi-factor enabled Dynamics 365 CRM environment

Introduction

I observed that, recently Ṁour clients are focusing more towards security aspect and hence the typical first thing they do is enabling multi-factor authentication. Now from developer’s perspective, there is no issue in accessing CRM through User Interface, because developers can get OTP on their mobile phones.

But, many times we use different third-party applications like XRMToolBox to connect to Dynamics CRM or use plugin registration tool to connect to organization. In such scenarios, we get an error even after putting correct credentials.

This blog explains solution to above problem.

Problem Statement

If multi-factor authentication is enabled for Dynamics 365, then developers could not connect to CRM via programming or Plugin Registration Tool or XrmToolbox etc., using their own password.

Solution

There is very simple solution which requires only below 2 steps:

  1. Follow this article to generate App Password.

https://docs.microsoft.com/en-us/azure/active-directory/user-help/multi-factor-authentication-end-user-app-passwords

  1. Once app password is generated and noted down from above step, use that password instead of your default password.

Hope you find this information useful!!!

Comment

This is a Required Field

Loading

Recent Updates

Blogs
27 Feb, 2026

How to Use Parameters in Power BI to Connect to Microsoft Dataverse

When working with multiple environments in Microsoft Dataverse (DEV, TEST, PROD), hardcoding the environment URL inside Power BI Desktop creates…

READ MORE
Blogs
25 Feb, 2026

Power Apps Production Deployment Checklist: Best Practices for a Smooth Go-Live

Introduction In Power Apps, even a small mistake during deployment can impact users and business processes. This checklist will help…

READ MORE
PCF Ribbon Button Thumbnail
Blogs
16 Feb, 2026

Launching a PCF Control from a Ribbon Button using Custom Pages in Dynamics 365

Introduction: In Model-driven apps, PCF controls are typically embedded inside forms or views. However, unique business requirements often demand more…

READ MORE