Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Problem Connecting to Dynamics using XRM Tooling

(0) ShareShare
ReportReport
Posted on by 4

Good Day, 

I have been searching through alot of post on the different messageboards, however i haven't found any that resolved my issue. 

i am trying to dynamics 365 using XRM tooling. It worked perfectly a month ago, however it suddenly stopped. 

After investigation it looks like it gets the environment information fine from the CrmServiceClient connection string, however, the user authentication isnt getting recognised. the OAuthuserid is empty("") and the OrganizationServiceProxy is all null.  

I have a suspicion that it has something to do with the version, the CRM Version is now 9.1.0.14432 , while the SDKVersionProperty is still 9.0.44.892.

i know my connection string is correct, seeing it was working perfectly fine a month ago.  the format i used is as follows. 

<connectionStrings>  
    <add name="Dynamics365Connection" connectionString="AuthType=Office365;Username=jsmith@contoso.onmicrosoft.com; Password='enterpasswordhere';Url=">contoso.crm.dynamics.com;RequireNewInstance=True;" />  
</connectionStrings>  



6048576.Capture.PNG

does anyone know if there is a new requirement when doing api connections using xrmtooling ?
Thanks
  • kale williams Profile Picture
    4 on at
    RE: Problem Connecting to Dynamics using XRM Tooling

    sorry,

    by safe I mean would it be deprecated completely and I would eventually be forced to switch over anyways.

  • Suggested answer
    a33ik Profile Picture
    84,325 Most Valuable Professional on at
    RE: Problem Connecting to Dynamics using XRM Tooling

    What do you mean safe? If you don't plan to put this connection string to place that is available to multiple people - it's safe. It's recommended to use oAuth authentication so you can got that path as well.

  • kale williams Profile Picture
    4 on at
    RE: Problem Connecting to Dynamics using XRM Tooling

    Is the O365 authentication safe to use ? as it says in the link you provided that I should use the oAuth method and create an app on azure AD.

  • Suggested answer
    a33ik Profile Picture
    84,325 Most Valuable Professional on at
    RE: Problem Connecting to Dynamics using XRM Tooling

    You can use execute. Something like:

    var client = new CrmServiceClient("connectionstringhere");

    var WhoAmIResponse = client.Execute(new WhoAmIRequest()) as WhoAmIResponse;

  • kale williams Profile Picture
    4 on at
    RE: Problem Connecting to Dynamics using XRM Tooling

    How do I use the CrmServiceClient instance to do something like a WhoAmI ? or an execute ?

  • Verified answer
    a33ik Profile Picture
    84,325 Most Valuable Professional on at
    RE: Problem Connecting to Dynamics using XRM Tooling

    Hello,

    Connection string should look like following:

      
          
     

    Just doublecheck that there is no additional quotes and so on.

    Inside your code just stop using Proxy - check this post - https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/authenticate-office365-deprecation

    Just use CrmServiceClient instance - it exposes all required CRUD and Execute methods.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,886 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,766 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans