Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Enable D365 Multifactor authentication programmaticaly

(0) ShareShare
ReportReport
Posted on by 814

I am using below block to get into D365 from outside, my Dynamics now using MWF due to which login is getting blocked. My client want this MWF enabled. 

https://nemely.com/blog/connect-to-multi-factor-enabled-d365-cds-programmatically-online-9-1/

I am not getting error just connection i Can't establish

Anyone has tried this any ideas?

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,959 Super User 2024 Season 1 on at
    RE: Enable D365 Multifactor authentication programmaticaly

    Hi,

    Have you checked the error details in crmServiceClient .CrmException and crmServiceClient .LastCrmException property?

    I hope you have assigned appropriate security roles and added Dynamics CRM Impersonation under API Permission in Azure app registration.

    Also, Modify the service url suggested by guido - docs.microsoft.com/.../use-connection-strings-xrm-tooling-connect

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,069 Super User 2024 Season 1 on at
    RE: Enable D365 Multifactor authentication programmaticaly

    the code posted there is correct, the only thing I would change is the url, should be without /main.aspx, so something like

    Url=cdsinctrial.crm.dynamics.com;

    for creating the clientid/clientsecret, follow the first part of this blog post, is the most recent and contains useful screenshots:

    https://benediktbergmann.eu/2022/01/04/setup-a-service-principal-in-power-automate/

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,735 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans