CRM Version 1612 (8.2.0.774) (DB 8.2.0.774) online
I’m attempting to get OData from a customer’s CRM sandbox environment using a custom C# application.
I followed the steps to register the app with Azure Active Directory: https://msdn.microsoft.com/en-us/library/mt622431.aspx.
I’ve granted consent using the url: https://login.windows.net/[app-endpoint-id]/oauth2/authorize?response_type=code&client_id=[client-id]&redirect_uri=[redirect-uri]
Within my C# application, I’m able to receive an OAuth access token.
When I attempt to call https://customer.crm.dynamics.com/XRMServices/2011/OrganizationData.svc/AccountSet?$select=Address1_Composite to get OData, I get a HTTP 200 OK success message but it returns HTML. The HTML looks like the attached screenshot (Screenshot1.jpg).
I’m able to enter the same URL into a web browser. I’m redirected to https://login.microsoftonline.com and I can enter my account information. I’m able to see the XML returned in the attached screenshot (Screenshot2.jpg).
See sample code in Screenshot3.jpg and Screenshot4.jpg




*This post is locked for comments
I have the same question (0)