Discover the URL for your organization using the Discovery Service

Applies to Dynamics 365 for Customer Engagement apps version 9.x

Use the discovery service to determine the organizations that a user is a member of, and the endpoint address URL to access the organization service for each of those organizations. This discovery service is necessary because Dynamics 365 for Customer Engagement apps is a multi-tenant environment—a single Dynamics 365 for Customer Engagement apps server can host multiple business organizations. By using the discovery service, your application can determine the endpoint address URL to access the target organization’s business data.

For Dynamics 365 for Customer Engagement apps installations, server and organization allocation may change as part of datacenter management and load balancing. Therefore, the discovery service provides a way to discover which Dynamics 365 for Customer Engagement apps server is serving your organization at a given time.

The following table lists the Web service URLs for the worldwide Dynamics 365 for Customer Engagementapps data centers.

Location Discovery Web service URL
North America https://disco.crm.dynamics.com/XRMServices/2011/Discovery.svc
North America 2 https://disco.crm9.dynamics.com/XRMServices/2011/Discovery.svc
Europe, Middle East and Africa (EMEA) https://disco.crm4.dynamics.com/XRMServices/2011/Discovery.svc
Asia Pacific Area (APAC) https://disco.crm5.dynamics.com/XRMServices/2011/Discovery.svc
Oceania https://disco.crm6.dynamics.com/XRMServices/2011/Discovery.svc
Japan (JPN) https://disco.crm7.dynamics.com/XRMServices/2011/Discovery.svc
South America https://disco.crm2.dynamics.com/XRMServices/2011/Discovery.svc
India (IND) https://disco.crm8.dynamics.com/XRMServices/2011/Discovery.svc
Canada https://disco.crm3.dynamics.com/XRMServices/2011/Discovery.svc
United Kingdom (UK) https://disco.crm11.dynamics.com/XRMServices/2011/Discovery.svc

For an Internet-facing deployment (IFD) installation, the Web service URL has the following form:

https://dev.<hostname[:port]>/XRMServices/2011/Discovery.svc  

For an on-premises installation, the web service URL has the following form:

http[s]://<hostname[:port]>/XRMServices/2011/Discovery.svc  

Consult the Developer Resources page in the Dynamics 365 for Customer Engagement Web application for the correct URL of your installation.

To use the discovery service, add a reference to the Microsoft.Xrm.Sdk.dll assembly to your Visual Studio project, and then add a using or imports statement to access the Microsoft.Xrm.Sdk.Discovery namespace. The IDiscoveryService interface provides Execute method you will use to pass a instance of the DiscoveryRequest class.

Alternatively, you can add the service references for the URLs described previously to your project.

In This Section

Discovery Service Methods
Discovery Service Messages (Request and Response Classes)
Messages in the Discovery Service
Sample: Accessing the DiscoveryService

Write Applications and Server Extensions
Use Dynamics 365 for Customer Engagement apps Services
Download endpoints using Developer resources page
Access the Web Services in Dynamics 365 for Customer Engagement
Quick Start: A Simple Program