web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Event Portal Web API

(0) ShareShare
ReportReport
Posted on by 90

Hello All,

The Event Portal Web API https://xyz.microsoftcrmportals.com/EvtMgmt/api/v2.0/events/readable_Event_Id is not working in our dev environment.

the api endpoint used is the event portal URL with a trailing end /

As part of testing purpose we changed the flag in PortalAPI, is this the reason for the event portal Web API to be not working.

Also we hosted the event portal on our dev dynamics 365 environment with  useRestStack: false, and emApplicationtoken: '', and also on localhost

{% assign bypassTokenVerification = true %}
Could you please suggest what has to be done for the WebAPI to be functional.
Regards
Abhilash
I have the same question (0)
  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    Hi Abhilash,

    As what I summarized in this thread:

    https://community.dynamics.com/365/marketing/f/dynamics-365-for-marketing-forum/410512/hosting-event-portal-on-dynamics-365/

    The URL pattern you are using is style of new Event Management Public API.

    To test deprecated Event Management Portal API locally, in addition to enabling the bypassTokenVerification property to true in PortalAPI, we need to also create a new site setting record for local development: it will allow localhost to get access to Event Portal Web API.

    Name: HTTP/Access-Control-Allow-Origin

    Value: http://localhost:4200

    pastedimage1607579378952v1.png

    In conclusion:

    1. In Portal Management, change the flag in PortalAPI and create a new site setting.

    2. In environment.ts,

    apiEndpoint: [PortalURL/

    useRestStack: false

    emApplicationtoken: ''

    3. To read a specific event, (demo d365mkt is readable id of event)

    pattern of the deprecated Event Management Portal API:

    https://company.microsoftcrmportals.com/api/events/event/?readableEventId=d365mkt

    pattern of the new Event Management Public API:

    https://abcxxx.svc.dynamics.com/EvtMgmt/api/v2.0/events/d365mkt?emApplicationtoken=32NDwxMFHxxx

    Regards,

    Clofly

  • Tiago Freitas Profile Picture
    80 on at

    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).

    pastedimage1632994398515v1.png

    pastedimage1632994523867v2.png

    pastedimage1632994563058v3.png

    Any ideas that could help me sort this issue?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 137 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans