web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Connecting to XRMToolBox with Multi Factor Authentication

(0) ShareShare
ReportReport
Posted on by 210

I have downloaded the latest version in an attempt to connect to our cloud based D365 with MFA.  I put the following in the connection string.

AuthType=Office365;Username=diane.e.fuller@spiritaero.com;Url=xxxxxxxxxxxx.dynamics.com;

When I clicked Connect I got the following error.  Any thoughts on what steps I missed?  Do I need to add something to AzureAD?  Is the connection string correct?

Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 7/26/2017 8:15:54 AM Unable to Login to Dynamics CRM Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 7/26/2017 8:16:54 AM Source : System.ServiceModel Method : ReadResponse Date : 7/26/2017 Time : 8:16:54 AM Error : ID3242: The security token could not be authenticated or authorized. Stack Trace : at System.ServiceModel.Security.WSTrustChannel.ReadResponse(Message response) at System.ServiceModel.Security.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)


Regards,

Diane

*This post is locked for comments

I have the same question (0)
  • DianeF1 Profile Picture
    210 on at

    Getting closer.... Now I think we defined something in Azure incorrectly

    Using: AuthType=OAuth;Url=https://xxxxx.dynamics.com/;AppID=xxxx;RedirectUri=http://www.xrmtoolbox.com;TokenCacheStorePath=C:\Temp;LoginPrompt=Always

    Additional technical information:

    Correlation ID: 681a41bc-3c12-4fc7-a489-a2a4dc34e452

    Timestamp: 2017-07-27 18:33:22Z

    AADSTS70001: Application with identifier xxx' was not found in the directory xxxxxxxxxxx

    Anyone with any hints on how to add XRMToolBox into Azure?  We did not do it correctly

  • Verified answer
    lloydz1 Profile Picture
    265 on at

    Whenever I have connected XRM toolbox to a tenant with MFA I have always generated app password, you can do that from the security section of your account on portal.office.com

  • Ben T Profile Picture
    803 on at

    Using the app password worked for me. Thanks. 

  • regerror6 Profile Picture
    on at

    What did the final connection string look like?  I have been trouble-shooting for a bit now but keep getting login errors.  I get the MFA prompt, but it will not authenticate.  The only other thing I can think of is setting up the app registration.  I tried following these steps:

    github.com/.../46

    Are there any step-by-step instructions for CRM online anywhere?

  • Suggested answer
    Ben T Profile Picture
    803 on at

    Did you try using an app password? It would be different from the PW you use to sign into Office 365 online or Dynamics. 

    You can read how to create one: https://support.office.com/en-us/article/create-an-app-password-for-office-365-3e7c860f-bda4-4441-a618-b53953ee1183

    I was able to use the app password and this solved the problem. May be the most straightforward route. 

  • regerror6 Profile Picture
    on at

    Thanks Ben!  Did you somehow embed that in your connection string or is it used in place of the MFA prompt?

  • Ben T Profile Picture
    803 on at

    Where it asks for the Dynamics password (like you would use to log into the online instance), I used the app password instead. That's all it took. Have you been able to get it working?

  • regerror6 Profile Picture
    on at

    Hi Ben, it worked like a charm.  I was stuck on the connection string and did not think to use normal authentication method—with the app password.

  • Patrick Friedrich Profile Picture
    395 on at

    Dear all,

    I followed all your instructions above except using the app password and I already connected to XRM but having multiple prompts to put in my password again and again.

    So is there any issue you are aware of? Btw: The user I try to login is in another domain then the user I´m starting XRM with. So I´m working on behalf of a customer, but that shouldn´t be a problem, right?

    I´m getting the following error log - the error is saying, that access on the path C:\Temp is denied. But I tried this with admin rights, changed the folder several times and granted access to everyone - no success yet.

    Is this the reason why I´m getting the login window again and again? Do I have to change the authentication method to the app? It´s not configured yet for me: "There it says: Microsoft Authenticator app option must be enabled and configured to select this preferred verification option."

    Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 16.01.2019 10:52:59  No Organizations Found, Searched online. Region Setting = EMEA

    Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 16.01.2019 10:52:59  Unable to Login to Dynamics CRM

    Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 16.01.2019 10:53:17  Error occurred in CrmServiceClientTokenCache.CrmServiceClientTokenCache().

    Exception Details : System.UnauthorizedAccessException: Der Zugriff auf den Pfad "C:\TEST" wurde verweigert.

      bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

    Any help is much appreciated!

    Cheers

    Patrick

  • Community Member Profile Picture
    on at

    Hello Diane.

    I am facing exactly the same issue of yours. Could you please help me through it. (if you had it resolved )

    Thanks,

    Pradeep Tumuluri

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans