Hi clofyMao,
I have set up a custom API (called Open Events) to fetch events based on a custom field filter.
https://myorg.svc.dynamics.com/EvtMgmt/api/v2.0/events/openevents?emApplicationtoken=TNI_zGrX1z0ytHaFiFPkE4
This API is placed under the OOB Events page, as you can see on the URL.
When I try to reach this API using the deprecated method, I'm able to retrieve the JSON with records. However, when I try to reach using the API 2.0 (with authentication via Azure B2C), I get a "Not Found" response.
I'm running tests using Postman, I managed to configure the correct headers and emApplicationToken parameter.
The weird part is, when I try to reach the OOB Events API that retrieves Published Events, it works perfectly and retrieves results.
https://myorg.svc.dynamics.com/EvtMgmt/api/v2.0/events/published?emApplicationtoken=TNI_zGrX1z0ytHaFiFPkE4xiwRjyj0SXPyQqNLz
So basically, with the same request structure, I can hit the OOB Events API, but I cannot hit my custom one.
This is the structure of my Custom API.
I set up a Web Page > Page Template > Web Template (where I have a Liquid Template with my custom FetchXml).
Any ideas that could help me sort this issue?