Use Microsoft Dynamics CRM 2013 services in code

 

Applies To: Dynamics CRM 2013

Microsoft Dynamics CRM provides two web services that can be used to identify your organization and to access CRM data. This section describes how to use these services when you are developing applications or customizations for CRM.

Important

Use of claims authentication in Microsoft Dynamics CRM Online or Microsoft Dynamics CRM on-premises/IFD requires you to install or enable Windows Identity Foundation (WIF) on your development computer. More information: Install Windows Identity Foundation (WIF) 3.5

IDiscoveryService web service

A single Microsoft Dynamics CRM installation can host multiple organizations on multiple servers. Therefore, it is important to specify which organization you want to access. The IDiscoveryService web service returns a list of organizations that the specified user belongs to and the URL endpoint address for each organization. More information: Discover the URL for your organization with IDiscoveryService web service and IDiscoveryService

IOrganizationService web service

The primary web service for accessing data and metadata in CRM is the IOrganizationService web service. More information: Use the IOrganizationService web service to read and write data or metadata and IOrganizationService

Add the Microsoft Dynamics CRM assemblies to your project

Most of the time you will choose to use the SDK assemblies in your development projects. Using the assemblies is the recommended developer scenario forMicrosoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online. These assemblies are in the SDK\Bin folder, along with the corresponding Visual Studio IntelliSense XML files. More information: Assemblies included in the Microsoft Dynamics CRM SDK 2013

Add the service reference to your project

You may have a development scenario where you want to include the service reference in your project rather than using the assemblies. To find the correct service references for your organization, see Download the endpoints using the Microsoft Dynamics CRM 2013 Developer resources page.

See Also

IDiscoveryService
IOrganizationService
Discover the URL for your organization with IDiscoveryService web service
Use the IOrganizationService web service to read and write data or metadata
Authenticate users with Microsoft Dynamics CRM 2013 web services
Use the early bound entity classes in code
Write applications and server extensions
Assemblies included in the Microsoft Dynamics CRM SDK 2013
Microsoft Dynamics CRM Developer Center