If you wish to use the Web Resource Utility that comes with CRM 2011 SDK on an CRM Online organization from Office 365, you will not be able to connect to the discovery service.

When you type in your credentials and server address you will get the error message shown below.

Error message

This is because the Web Resource Utility uses

https://dev.[address_typed_in]/XRMServices/2011/Discovery.svc

That is correct for CRM Online as the discovery service, but not when you have CRM from Office 365. Office 365 instances of CRM uses disco insted of dev in the URL. So a correct URL for a CRM Online from Office 365 is

https://disco.[address_typed_in]/XRMServices/2011/Discovery.svc

For more info on the differnet discovery services see MSDN

Luckily there is an easy fix to the problem. In the method GetServerConfiguraton in the class ConsolelessServerConnection we have to change the DiscoveryUri.

Open the file and simply change the line

config.DiscoveryUri = new Uri(String.Format("https://dev.{0}/XRMServices/2011/Discovery.svc", config.ServerAddress));

to

config.DiscoveryUri = new Uri(String.Format("https://{0}/XRMServices/2011/Discovery.svc", config.ServerAddress));

After this change you will have to specify dev/disco part to use the tool, but it will work for both “regular” CRM Online and CRM Online from Office 365.

Connection window




blog comments powered by Disqus

About Sebastian

Sebastian Holager

Sebastian Holager is a developer working in Oslo, Norway. At day time hacking away on Dynamcs CRM, C# and JavaScript. While at night playing around with other programming languages, reading and watching football.

Follow me on twitter