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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Queries related to ODa...
Power Apps
Answered

Queries related to OData v2.0 deprecation and its C# code Upgradation

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Community ,
As a part of Odata Deprecation Official Blog , we are upgrading our CRM service connection C# code with IOrganizationService and CrmServiceClient that inherits from the Microsoft.Xrm.SDK (part of Microsoft.CrmSdk.CoreAssemblies DLL)
We see the Microsoft.CrmSdk.CoreAssemblies latest version (v 9.0.2.49) also have the endpoint referencing the Organizationdata.svc endpoint . Will this cause any issue post the v2 deprecation . I am attaching the old code and upgraded C# code (without use of organizationdata.svc endpoint) that makes connection to the CRM service . Could you please check and confirm us on this. And also if you suggest any other good approach also is appreciable . Thanks in advance

 

Click referred for Code Upgradation - Connect CrmServiceClient

OldCode_OdataV2.0.png
UpgradedCode_Approach.png
I have the same question (0)
  • Guido Preite Profile Picture
    1,490 Super User 2024 Season 1 on at

    the code you posted is not strictly related to the OData 2.0 endpoint but is important for other parts (deprecation of OrganizationServiceProxy)

    in your updated code, just return the conn object (containing the ServiceClient object you created), you don't need the line where you check the OrganizationServiceProxy

     

     

     

  • Praveen200197 Profile Picture
    Microsoft Employee on at

    Thank you very much for the reply . Let me explain by point here 

     

    The code you posted is not strictly related to the OData 2.0 endpoint but is important for other parts (deprecation of OrganizationServiceProxy) - In the official blog wherever we make connection with use of OrganizationData.svc , they ask us to replace (In our case we have CrmServiceUrl used) . Please correct me If I am wrong .

    In your updated code, just return the conn object (containing the ServiceClient object you created), you don't need the line where you check the OrganizationServiceProxy - I tried the same as well but I am getting the CrmConnectOrgUri and other properties connected with Organizationdata.svc . Here is where I am little confused like whether it cause any issue post the Organizationdata.svc deprecation. attaching the snaps here. Once again , thanks a lot for your prompt response.

     

     

    Conn_OrganizationDataReference_2.png
    ODataDeprecation.png
    Conn_OrganizationDataReference.png
  • Verified answer
    Guido Preite Profile Picture
    1,490 Super User 2024 Season 1 on at

    your old connection uses organizationdata.svc but that is a very very old way to connect, I never used it as a CrmServiceClient with the connection string is enough (CrmServiceClient is the object of the .NET framework SDK, ServiceClient of the new .NET SDK)

     

    the screenshots you posted refers to organization.svc, not organizationdata.svc, also when you use the official SDK you are "protected" from these changes, if tomorrow under the hood they change the .svc endpoint your code is not affected (because now you are using a connection string)

  • Praveen200197 Profile Picture
    Microsoft Employee on at

    Great .Now I am clear .  Thank you very much

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 414

#2
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 315 Super User 2026 Season 1

Last 30 days Overall leaderboard