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 :
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
I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    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.

  • kale williams Profile Picture
    4 on at

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

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    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

    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,331 Most Valuable Professional on at

    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

    sorry,

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

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans