Discover the URL for your organization using the Organization Service


Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

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

For Microsoft Dynamics 365 (online & on-premises)installations, server and organization allocation may change as part of datacenter management and load balancing. Therefore, the IDiscoveryServiceWeb service provides a way to discover which Microsoft Dynamics 365server is serving your organization at a given time.

The following table lists the Web service URLs for the worldwide Microsoft Dynamics 365 (online)data centers.


Discovery Web service URL

Identity Provider

North America

Microsoft account

Microsoft Office 365

North America 2

Microsoft Office 365

Europe, Middle East and Africa (EMEA)

Microsoft account

Microsoft Office 365

Asia Pacific Area (APAC)

Microsoft account

Microsoft Office 365


Microsoft Office 365

Japan (JPN)

Microsoft Office 365

South America

Microsoft Office 365

India (IND)

Microsoft Office 365


Microsoft Office 365

United Kingdom (UK)

Microsoft Office 365

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


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


Consult the Developer Resourcespage in the Microsoft Dynamics 365Web application for the correct URL of your installation.

To use the IDiscoveryServiceWeb service, add a reference to the Microsoft.Xrm.Sdk.dllassembly to your Microsoft Visual Studioproject, and then add a usingor importsstatement to access the Microsoft.Xrm.Sdk.Discoverynamespace. Alternatively, you can add the service references for the URLs described previously to your project.

In This Section

IDiscoveryService methods

Discovery service messages (request and response classes)

Messages in the discovery service

Sample: Access the Discovery service

Extend Microsoft Dynamics 365 on the server

Use Microsoft Dynamics 365 services in code

Download the endpoints using the Microsoft Dynamics 365 Developer resources page

Authenticate users in Microsoft Dynamics 365

Run a simple program using Microsoft Dynamics 365 web services

Microsoft Dynamics 365

© 2017 Microsoft. All rights reserved. Copyright