Dynamics CRM Discovery and Web Service URLs

Dynamics CRM Discovery and Web Service URL’s to use, based on the Developer Resources Page in CRM.

Here is the information that you need:

For CRM Online customers:

The following URLs should be used to access the discovery service (use the appropriate URL for your location):

Provider: Microsoft Office 365
https://disco.crm.dynamics.com/XRMServices/2011/Discovery.svc (North America)
https://disco.crm4.dynamics.com/XRMServices/2011/Discovery.svc (EMEA)
https://disco.crm5.dynamics.com/XRMServices/2011/Discovery.svc (APAC)

Provider: Microsoft Account
https://dev.crm.dynamics.com/XRMServices/2011/Discovery.svc (North America)
https://dev.crm4.dynamics.com/XRMServices/2011/Discovery.svc (EMEA)
https://dev.crm5.dynamics.com/XRMServices/2011/Discovery.svc (APAC)

The following URLs should be used to access the Organization service(SOAP endpoint):

https://{Organization Name}.api.crm.dynamics.com/XrmServices/2011/Organization.svc (North America)
https://{Organization Name}.api.crm4.dynamics.com/XrmServices/2011/Organization.svc (EMEA)
https://{Organization Name}.api.crm5.dynamics.com/XrmServices/2011/Organization.svc (APAC)

Where {Organization Name} refers to the Organization that you specify in the URL when accessing the Web application. For example, for Contoso.crm.dynamics.com, the {Organization Name} is Contoso.

The following URLs should be used to access the Organization Data service(OData REST endpoint)

https://{Organization Name}.api.crm.dynamics.com/XrmServices/2011/OrganizationData.svc (North America)
https://{Organization Name}.api.crm4.dynamics.com/XrmServices/2011/OrganizationData.svc (EMEA)
https://{Organization Name}.api.crm5.dynamics.com/XrmServices/2011/OrganizationData.svc (APAC)

For CRM On-premise
s customers:
http://{server}/XRMServices/2011/Discovery.svc for the Discovery service endpoint
http://{server}/{OrgName}/XRMServices/2011/Organization.svc for the Organization Service endpoint (SOAP)
http://{server}/{OrgName}/XRMServices/2011/OrganizationData.svc for the Organization Data Service endpoint (REST)
http://{server}/XRMDeployment/2011/Deployment.svc for the Deployment Service endpoint


47 thoughts on “Dynamics CRM Discovery and Web Service URLs

  1. Sanuja

    Dear Mr Clinton,

    I have an issue consuming the CRM webservice (/MSCrmServices/2007/CrmService.asmx).

    I could use the ‘Retrieve’ method to get the details of for eg. lead . It works fine for certain tables ( eg: lead , email etc), while throws a ‘Server was unable to process request’ error for certain other ones such as ‘activityparty’ ,’activitypointer’ etc

    This code worked well for us :

    Guid actGuid = new Guid(“DEAFAAA8-ECCA-DD11-BE84-005056960EF3”);
    lead objLead= new lead();
    objLead= (lead)service.Retrieve(EntityName.lead.ToString(), actGuid, new AllColumns());
    return objLead.lastname;

    While this one throws an error :

    Guid actGuid = new Guid(“EE7DF408-4233-DF11-B295-005056960EF3”);
    activityparty objact = new activityparty();
    objact = (activityparty)service.Retrieve(EntityName.activityparty.ToString(), actGuid, new AllColumns());
    return objact.partyid.Value.ToString();

    Tried updating the web reference. Still the same issue.
    Is there any way that some entities are blocked in some way !? Can there be such a chance on the CRM Server?
    What is the possible way to resolve this situation?

    Any help would be highly appreciated.!

    Thanks in advance !


  2. Pingback: Did you know, Dynamics CRM & xRM #4 « North 52

  3. Pingback: CRM 2011 Discovery and Web Service Urls « Crm Business

  4. Mike

    Do you know which URL to use if trying to connect Scribe Insight to a CRM 2011 Online system?
    We are in EMEA and we have not had much luck.

  5. shirpk

    Thanks for sharing valuable information.
    I want to use MS CRM 2011 web services in my application which is a desktop application and written in .net frame work 3.5, I used 2007 end point and my all existing functionality which was for MS CRM4.0 is working fine.

    Now I need to create a solution programmatically and I don’t want to upgrade my code to .net frame work 4.

    Problem is when I add organization service reference in my application I am unable to access “createsolutionrequest” class. Is there any work around to create solution from the client application without upgrading code from .net 3.5 to .net 4?

    1. Rhett Clinton Post author

      i think your alternative is to use Javascript and access the WCF Organization.svc web service and access it this way, you shouldn’t have to upgrade to .NET.

      1. Azmat Shir

        Actually limited functionality can accessed using javascript by using REST endpoint, I want to use “ImportSolutionRequest” and REST endpoint only support create, update and delete message .

      2. Rhett Clinton Post author

        Yes that is correct, but you can use the WCF endpoint for calling into the Organization.svc service to achieve what you need from JavaScript instead.


  6. Azmat Shir

    I used Organization.svc WCF by adding service reference in .Net3.5 but “ImportSolutionRequest” class is not available, this class is only available when we add SDK assemblies references in .Net4 project. My problem is I don’t want to upgrade my code from .Net3.5 to .NET 4.

  7. Rick Gipson

    What would cause a CRM 2011 On-Premise OrganizationData.svc to not be found?

    Both the http://{servername}:5555/{OrgName}/XRMServices/2011/Organization.svc and the http://{servername}:5555/{OrgName}/XRMServices/2011/Discovery.svc respond, but http://{servername}:5555/{OrgName}/XRMServices/2011/OrganizationData.svc yields a 404 Page Not Found? I can see the OrganizationData.svc file in that folder in IIS,so I know it is there physically. Any thoughts?

      1. Rick Gipson

        I loaded the OData Query Designer, but when it loads it generates this error:

        Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60531.0&File=System.dll&Key=Async_ExceptionOccurred

        at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
        at CRM.Tools.ODataQueryDesigner.CrmSdk.ExecuteCompletedEventArgs.get_Result()
        at CRM.Tools.ODataQueryDesigner.Readers.MetadataReader.ExecuteRetrieveEntities_ExecuteCompleted(Object sender, ExecuteCompletedEventArgs response)
        at CRM.Tools.ODataQueryDesigner.CrmSdk.OrganizationServiceClient.OnExecuteCompleted(Object state)

      2. Rhett Clinton Post author

        Make sure you access CRM with the URL address that was used to install CRM as the tool uses Xrm.Page.context.getServerUrl() and if this is different from what you use then you will get a cross domain security error.

        Cheers, Rhett

      3. Rick Gipson

        If it was a url issue, wouldn’t it impact Discovery.svc and Organizations.svc as well?

      4. Rhett Clinton Post author

        Hi Rick, I remember seeing something like this around 6 months ago on the forums but I cannot seem to find the post.

        It could be an IIS issue like Kernel mode being set under windows authentication or similar but I’ll have another look and see if I can find the solution for you.

        Cheers, Rhett

      5. Rick Gipson

        Thanks for all the help. I really appreciate it… I cannot seem to find any help online to resolve this issue.

        – The http://scottr27.wordpress.com/2011/02/16/crm-2011request-error-in-the-organizationdata-svc/ issue does not apply as I am using the {OrgName} in my url reference

        – The http://social.microsoft.com/Forums/en/crm/thread/71365831-c968-43fb-ab6f-8e9ac3534ebd issue does not apply as I’m not using a self-signed certificate — not using SSL certificate at all and not IFD yet.

        – The http://blog.ringelbergs.nl/blog/?p=1229 issue does not apply as the OrganizationData.svc does not use the UrlRewrite features of IIS. I did check the UrlRewrite feature for the CRM web and it had the FederationMetadataRule, ClientGlobalContextRule and the WebResourcesRule. If the OrganizationData.svc needed a rule in the UrlRewrite, wouldn’t the Discovery.svc and Organization.svc also need to be there? Those two are working fine without a UrlRewrite Rule.

        Thanks again and if you have any other ideas — please let me know.


      6. Rick Gipson

        Thanks Rhett,

        I turned on CRM Tracing and here is what was reported:
        >MapOrgEngine: Retreived the OrgId[{AA965ECA-3D3A-411E-8261-CCCF566B5B82}] for URL[http://343332-db2.employbridge.net:5555/CRMDEV/XRMServices/2011/OrganizationData.svc].[2011-06-21 10:49:17.162]

        >MapOrgEngine: Unable to retrieve the OrgId for URL[http://343332-db2.employbridge.net:5555/CRMDEV/XRMServices/2011/OrganizationData.svc].[2011-06-21 10:49:17.162]

        >AUTH: Request [GET http://343332-db2.employbridge.net:5555/CRMDEV/XRMServices/2011/OrganizationData.svc%5D from [] entered Authentication Pipeline.[2011-06-21 10:49:17.162]

        >AUTH: AuthenticationProvider [Microsoft.Crm.Authentication.PassThroughAuthenticationProvider] will be attempted.[2011-06-21 10:49:17.162]

        AUTH: AuthenticationProvider [Microsoft.Crm.Authentication.PassThroughAuthenticationProvider] handled request [http://343332-db2.employbridge.net:5555/CRMDEV/XRMServices/2011/OrganizationData.svc] from [].[2011-06-21 10:49:17.162]

        >FileExists ~/XRMServices/2011/OrganizationData.svc returning True.[2011-06-21 10:49:17.162]

        >GetFileHash(/CRMDEV/XRMServices/2011/OrganizationData.svc, System.Collections.ArrayList) called.[2011-06-21 10:49:17.209]

        >Sdk Service Throttle.SdkMaxConcurrentCalls:64 [2011-06-21 10:49:17.209]
        >Sdk Service Throttle.MaxConcurrentInstances:464 [2011-06-21 10:49:17.224]
        >Sdk Service Throttle.MaxConcurrentSessions:400 [2011-06-21 10:49:17.240]

        >Failed to lookup a channel to receive an incoming message. Either the endpoint or the SOAP action was not found. [2011-06-21 10:49:17.271]

        >System.ServiceModel.EndpointNotFoundException: There was no channel actively listening at ‘http://343332-db2.txdal01.employbridge.net:5555/CRMDEV/XRMServices/2011/OrganizationData.svc’. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening. [2011-06-21 10:49:17.271]
        > at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
        > at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
        > at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
        > at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
        > at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)

        >>>>>> EXCEPTION: 1
        >Type: System.ServiceModel.EndpointNotFoundException
        >Message (293): There was no channel actively listening at ‘http://343332-db2.txdal01.employbridge.net:5555/CRMDEV/XRMServices/2011/OrganizationData.svc’. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening.
        >StackTrace: present: A38A65A9

        >>>>>> FAULT: 1
        >ErrorCode: 0x80040216: ErrorCodes.UnExpected
        >Message (153): System.ServiceModel.EndpointNotFoundException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #D49ADF0C

        So for some reason the OrganizationData.svc is not listening for requests. How can I configure the service and why would the Discovery.svc and Organization.svc work, but this one doesn’t?

    1. Kari Lappalainen

      Hi Rick,

      late reply but as far as I had this problem it was because of OrganizationData.svc endpoint was only available to webresource type of items (html, jscript, embedded silverlight) and not from outside of CRM context.

      1. Friedhelm Wolf

        Hi Rick,

        I’m wondering if you ever got to resolve this issue. We have a very similar problem here.

  8. Sultan


    When I try to access XRMServices/2011/Organization.svc I’ve the following error, though a couple of days ago it was working well.

    An error has occurred.

    Try this action again. If the problem continues, check the Microsoft Dynamics CRM Community for solutions or contact your organization’s Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft Support.

    What is the problem or what’s wrong with my CRM installation?

      1. Sultan

        I enabled the DevErrors option and now I have the following exception

        System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Crm.MainApplication.Application_Error(Object sender, EventArgs eventArguments)

      2. Sultan

        Yes I include the organization name, and at Settings > Customizations > Developer resources I see the link to the service endpoints but they also give the same error

      3. Sultan

        Stack Trace:

        Error Description:
        Generic SQL error.

        Error Details:
        Generic SQL error.

        Full Stack:
        [SqlException: Cannot open database “ASPState” requested by the login. The login failed.

        Login failed for user ‘NT AUTHORITY\NETWORK SERVICE’.]
        at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

        [HttpException: Unable to connect to SQL Server session database.]
        at System.Web.SessionState.SqlSessionStateStore.ThrowSqlConnectionException(SqlConnection conn, Exception e)

  9. Oliver

    I get this with the latest CRM 2011 server version, Rollup 3, when trying to connect from Outlook client:

    “Unable to retrieve the OrgId for URL XrmServices/2011/Discovery.svc CRM 2011 Authentication Engine”

    Any helpd from someone?

  10. Pingback: CRM 2011 Discovery and Web Service URLs | Shivam Dixit Dynamics CRM Blog

    1. Rhett Clinton MVP Post author

      Hi Jody, you can find how to discover the URL for Your Organization with IDiscoveryService Web Service here http://msdn.microsoft.com/en-us/library/gg328127(v=crm.6).aspx and you can find all of the web service URLs for your organisation in CRM under Settings->Customization->Developer Resources, 2013 uses the same URLs as 2011.

      Also you can find the full list of URLs here under the article ‘Download the endpoints using the Dynamics CRM Developer resources page’. http://msdn.microsoft.com/en-us/library/gg309401(v=crm.6).aspx


  11. Guillaume Ridoux


    I’m using a trial instance of CRM online and I’m trying to call the web service to retrive data (account name).
    I’m using the following URL to call the webservice:

    I receive the following error back:

    Exception in component tMicrosoftCrmInput_1
    org.apache.axis2.AxisFault: The server did not recognise the action which it received.
    at org.apache.axis2.handlers.addressing.AddressingInFaultHandler.invoke(AddressingInFaultHandler.java:115)
    at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
    at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
    at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:168)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:364)
    [ERROR]: org.talend.ms.crm.MSCRMClient – The server did not recognise the action which it received.
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    at com.microsoft.schemas.xrm._2011.contracts.DiscoveryServiceStub.execute(DiscoveryServiceStub.java:187)
    at org.talend.ms.crm.MSCRMClient.discoverOrganizationUrl(MSCRMClient.java:295)
    at org.talend.ms.crm.MSCRMClient.getOnlineConnection(MSCRMClient.java:123)

      1. Guillaume Ridoux

        Hi Rhett,
        Correct me if I’m wrong but I’m using talend and it usually deploys all the packages needed to use the API. Therefore I think I have all the components installed (I can see the netbeans, eclipse, axis2, etc. jar files).

        I’ve tried to make a call to the disco web service and it returned that I was using the wrong organization name. does this means that I have the right environment (as I’m able to get a response from the webservice)?

        Is it possible that with my online CRM trial user I don’t have access to the web service?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.