I thought this should be very trivial and simple but it is not at least not in my case.
Note: I am able to get records for accounts and contacts from the same organization but not cases entity for some reason.
For info:
- I got a trail Dynamics 365 instance, fromheaven.crm.dynamics.com and would like to use it to try out the Web APIs.
- I am following the Web API Basic Operations Sample (C#). Everything works fine and I am able to completely run the sample code in order to create, delete, update account or contact. Therefore, the authentication is definitely working.
- Then I try to change the code to fetch records for Cases. That is where the problem starts. The piece of code is super simple:
HttpResponseMessage retrieveResponse1 = await httpClient.GetAsync("fromheaven.crm.dynamics.com/.../cases");
if (retrieveResponse1.StatusCode == HttpStatusCode.OK) { ...}
4. The retrieveResponse1.StatusCode is always 404 with ReaonPhrase: "Not Found". However, if I change the URL to fetch contacts (https://fromheaven.crm.dynamics.com/api/data/v9.0/contacts) or account (https://fromheaven.crm.dynamics.com/api/data/v9.0/accounts), then it works perfectly.
5. You can see from below snapshot that my trail instance does have this entity type and have data as well.
Why does the call always return 404? Can anyone shed some light?
Thanks