CrmService to the Web API: every CRM web service endpoint from 2006 to Dataverse

The 2006 and 2007 ASMX services, the 2011 WCF organization service and OData endpoint, the Web API from 8.0, and what is deprecated today. What each era changed, and what an old URL in someone else's code tells you.

Answer first

Five generations of web service, each deprecated by the next:

Era Endpoint Technology Status
CRM 3.0 /mscrmservices/2006/crmservice.asmx, metadataservice.asmx ASMX SOAP Still worked in 4.0; not included in 2011
CRM 4.0 /mscrmservices/2007/ CrmService, MetadataService, CrmDiscoveryService ASMX SOAP Kept in 2011; ended with 2013
CRM 2011 /XRMServices/2011/Organization.svc and Discovery.svc WCF SOAP, through the SDK assemblies Deprecated from 8.1; still used by the SDK assemblies, no removal date
CRM 2011 /xrmservices/2011/organizationdata.svc OData v2 (REST) Deprecated in 8.0; removal deferred in Dataverse
8.0 onward /api/data/v8.0/, today v9.2 OData v4, the Web API Current

Two things carried through. The core operations stayed recognisable. CRM 3.0 already had Create, Retrieve, Update, Delete and an Execute for everything else, and under today’s Web API every operation still goes through the organization service. Microsoft’s advice stayed the same too: use the documented APIs and its own assemblies. Current documentation names code that calls the SOAP endpoint without Microsoft’s service clients as the code facing the planned shutdown.

Each section names its sources: the CRM 3.0, 4.0 and 2011 SDKs, the 2016 SDK, archived CRM 2013 documentation, and current on-premises and Dataverse documentation.

CRM 3.0: the 2006 services

Source: the CRM 3.0 SDK. Details on the CRM 3.0 web services.

  • Two ASMX services, CrmService and MetadataService, added to a project as web references.
  • The WSDL is generated on the server and includes that deployment’s customizations, so the typed classes you compiled matched one schema. DynamicEntity covered entities that weren’t in the WSDL, but only through Execute.
  • Windows authentication, and impersonation through a CallerId SOAP header from an account in PrivUserGroup.
  • MetadataService was read-only.

CRM 4.0: the 2007 services

Source: the CRM 4.0 SDK.

  • One deployment, many organizations. Each organization gets its own WSDL and endpoint under /mscrmservices/2007/, and the new CrmDiscoveryService finds them.
  • Pluggable authentication: Active Directory on-premises and for Internet-facing deployments, and Windows Live ID for CRM Online.
  • MetadataService could write, so installers could create customizations in code.
  • Offline: the CrmService methods also worked offline in Outlook.
  • Script called the SOAP service directly. GenerateAuthenticationHeader() built the SOAP header for XMLHttp calls from form scripts.
  • The 2006 endpoint kept working for 3.0 code, but sent requests to the default organization and skipped data validation and default values.

CRM 2011: WCF, and a REST endpoint

Source: the CRM 2011 SDK.

  • ASMX gave way to WCF. IOrganizationService at /XRMServices/2011/Organization.svc became the primary service for data and metadata, and IDiscoveryService at /XRMServices/2011/Discovery.svc found organizations. The SDK’s helper proxy classes, such as OrganizationServiceProxy, hid most of the WCF and claims-based security work.
  • Two authentication models: claims-based and Active Directory, depending on the deployment.
  • A new programming model:
    • native .NET types replaced wrappers such as CrmBoolean;
    • the late-bound Entity class replaced DynamicEntity;
    • CrmSvcUtil.exe generated early-bound classes and an OrganizationServiceContext with change tracking and a LINQ provider.
  • Queries consolidated. RetrieveMultiple accepts a QueryExpression or a FetchExpression. ExecuteFetchRequest was deprecated.
  • Error codes changed. Code that branches on specific error codes needs checking.
  • Two endpoints for web resources:
    • The REST endpoint (organizationdata.svc, OData over ATOM or JSON) for JScript and Silverlight web resources only. It handled create, retrieve, update and delete, but not Execute messages, and authenticated only inside the application.
    • The SOAP endpoint at /XRMServices/2011/Organization.svc/web, the organization service with authentication provided by the application.
  • The 2007 endpoint stayed so 4.0 code kept working, except for Office 365 organizations. The 2006 endpoint did not.

CRM 2013: the 2007 services go

Sources: Microsoft’s archived CRM 2013 documentation.

CRM 2013 ended support for the CRM 4.0 web service API. Scripts built on GenerateAuthenticationHeader and the 2007 endpoint had to move to the REST or SOAP endpoints. Microsoft’s pages disagree on whether 2013 removed the endpoint or only deprecated it; the CRM 2013 page quotes both.

CRM 2016 (8.x): the Web API

Source: the CRM 2016 SDK. Details on the CRM 2016 page.

  • 8.0 introduced the Web API, OData v4.0 at /api/data/v8.0/, and deprecated the OData v2 organization data service.
  • 8.1 deprecated the 2011 SOAP endpoint, with removal then planned for some time after version 9.

9.x on-premises and Dataverse: where it stands

Sources: Microsoft’s current on-premises and Dataverse documentation.

  • The Web API reached parity with the organization service in 9.x. It’s the recommended choice for code that doesn’t run on the server. Its current version segment is v9.2, and code written against v9.0 keeps working.
  • Plug-ins and workflow assemblies still use the organization service. Under the Web API, every operation goes through it anyway.
  • The 2011 SOAP endpoint is deprecated but still works. The SDK assemblies still use it, and Microsoft promises updated assemblies before any removal. The timeline names a future shutdown for clients that don’t use CrmServiceClient or ServiceClient.
  • OData v2 removal is deferred, after dates in November 2022 and April 2023 passed without it.
  • Authentication moved on. The WS-Trust “Office365” authentication type is retired, the regional discovery service gave way to a global one, and ServiceClient with MSAL replaced CrmServiceClient for applications.
  • Load is limited per user, with 429 Too Many Requests and Retry-After.

If you find this in old code

Sources: as for each section above.

You find It means What to do
/mscrmservices/2006/ CRM 3.0 web services Not available from CRM 2011 on; rewrite
/mscrmservices/2007/ or GenerateAuthenticationHeader() CRM 4.0 web services Support ended with CRM 2013; rewrite
CrmBoolean, DynamicEntity, CrmDiscoveryService CRM 3.0 or 4.0 SDK types Rewrite against the organization service or the Web API
/XRMServices/2011/OrganizationData.svc OData v2 organization data service Deprecated; move to the Web API before a removal date is announced
/XRMServices/2011/Organization.svc called with hand-built SOAP or WCF proxies The 2011 SOAP endpoint, bypassing the service clients The code most at risk from the planned shutdown; use ServiceClient or the Web API
OrganizationServiceProxy or CrmServiceClient with the “Office365” type WS-Trust authentication Retired in Dataverse; move to ServiceClient with MSAL
/api/data/v9.0/ or later The Web API Current; versions from v9.0 keep working

Sources

  1. Use Dynamics 365 Customer Engagement web services (on-premises 9.x) Microsoft · · Primary, current docs Microsoft’s comparison of the 9.x web services: the Web API reached parity with the organization service; server-side code keeps using the organization service; the SDK assemblies still use the deprecated 2011 SOAP endpoint; the OData v2 organization data service is deprecated and no longer documented for this release.
  2. Use the Dataverse SDK for .NET Microsoft · · Primary, current docs Microsoft’s overview of the SDK for .NET and the organization service: ServiceClient recommended for new applications, plug-ins and custom workflow activities built on .NET Framework, and the 2011 SOAP endpoint deprecated but still working and supported until removed, with updated assemblies promised before removal.
  3. Transition apps to Dataverse ServiceClient Microsoft · · Primary, current docs Microsoft’s move from CrmServiceClient (ADAL) to ServiceClient in Microsoft.PowerPlatform.Dataverse.Client (MSAL, .NET Core support). Plug-ins and custom workflow activities are unaffected and keep the CoreAssemblies packages, and can target .NET Framework 4.8 or the legacy 4.6.2 and 4.7 versions. The timeline lists a planned, undated shutdown of the 2011 SOAP endpoint for clients not using the service clients.
  4. Use the Microsoft Dataverse Web API Microsoft · · Primary, current docs Microsoft’s Web API overview: OData v4.0, no Microsoft client libraries other than the Python SDK, and all data operations going through the underlying organization service, whose messages drive the event framework.
  5. Compose HTTP requests and handle errors (Dataverse Web API) Microsoft · · Primary, current docs Microsoft’s reference for Web API requests, including the version segment in the URL (current version v9.2) and the statement that code written against v9.0 keeps working when it references v9.0.
  6. Important changes (deprecations) coming in Power Apps and Power Automate Microsoft · · Primary, current docs Microsoft’s running deprecation list, first published June 2017 and written for the online service. Its section on deprecated client APIs, linked from the 9.x on-premises client scripting page, lists Xrm.Page and its replacements.
  7. Service protection API limits (Dataverse) Microsoft · · Primary, current docs Microsoft’s service protection limits: per-user limits over a five-minute sliding window on number of requests, combined execution time and concurrent requests, returned as 429 Too Many Requests with a Retry-After value, and automatic retry in Xrm.Tooling.Connector versions after 9.0.2.16.
  8. Microsoft CRM 3.0 SDK (compiled help, crmsdk3_0.chm, 2007 edition) Microsoft · Primary, archived Private archive: CRM-SDK-Rescue/3.0-SDK/crmsdk3_0.chm Microsoft’s SDK help for CRM 3.0: the Server Programming Guide’s callout model, method signatures, callout.config.xml reference, error handling and tracing, and the CrmService and MetadataService web services at /mscrmservices/2006/, including security, impersonation, DynamicEntity, FetchXML and QueryExpression. The owner’s copy came from a third-party software archive; it is a valid help file whose 6,937 pages all carry Microsoft’s 2007 copyright. Read as documents only, never executed. Quote sparingly and cite; do not republish.
  9. Microsoft Dynamics CRM 4.0 SDK (compiled help, CrmSdk4.chm, version 4.0.13, November 2010) Microsoft · Primary, archived Private archive: CRM-SDK-Rescue/4.0-SDK/sdk/crmsdk4.chm Microsoft's SDK help for CRM 4.0 Update Rollup 13 and CRM Online: plug-in development (IPlugin, the execution context, the unsecure and secure constructor strings), the event execution pipeline and its parent and child pipelines, registration and deployment, impersonation, error handling, offline plug-ins, execution of CRM 3.0 callouts, the 2006 endpoint, and what is new in the 4.0 web services. Extracted without running anything from CrmSdk4.exe, whose Microsoft Authenticode signature is valid and which the Internet Archive captured from download.microsoft.com. All 12,022 pages carry Microsoft's copyright. Quote sparingly and cite; do not republish.
  10. Microsoft Dynamics CRM 2011 SDK (compiled help, CrmSdk2011.chm) Microsoft · Primary, archived Private archive: CRM-SDK-Rescue/2011-SDK_from_desk/SDK/CrmSdk2011.chm Microsoft's own SDK help for the 2011 release, from an owner-held copy. Static reading only; the package is never executed and is not part of this repository. Quote sparingly and cite; do not republish.
  11. Upgrade scripts to Microsoft Dynamics CRM 2013 (Microsoft Dynamics CRM 2013 SDK, archived) Microsoft · · Primary, archived Microsoft’s archived guidance on form script upgrades to CRM 2013: the CRM 4.0 object model (crmForm), the 2007 endpoint, getServerUrl and AuthenticationHeader removed, and the supported Xrm.Page methods that replace common unsupported techniques.
  12. What’s changing in the next release (Microsoft Dynamics CRM 2013 SDK, archived) Microsoft · · Primary, archived Microsoft’s archived CRM 2013 notice of coming changes: the 2007 SOAP endpoint deprecated in CRM 2013 and due for removal in the next release; getServerUrl, isOutlookClient and IsOutlookClientOnline to be removed in favour of getClientUrl, client.getClient and client.getClientState; getFormType no longer returning Quick Create or Read Optimized; old forms removed on upgrade only if deactivated; the Kit product type deprecated; Internet Explorer 8 and 9 support dropped.
  13. Microsoft Dynamics CRM 2016 / Dynamics 365 SDK (compiled help, Dynamics365SDK.chm, and SDK tree) Microsoft · Primary, archived Private archive: CRM-SDK-Rescue/2016-D365-SDK_from_DESKTOP-Code/SDK Microsoft SDK for the 8.x era, from an owner-held copy: the compiled help (Dynamics365SDK.chm, read as documents, never executed), sample code, schemas and UII material. Its what’s-new topic covers CRM 2016 (8.0), CRM 2016 Service Pack 1 (8.1) and the December 2016 update for Dynamics 365 (8.2). Quote sparingly and cite; do not republish. Its SampleCode/CS/HelperCode/OptionSets.cs lists the component type values the 2016 SDK knew.