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

Create & Update Events through API

(0) ShareShare
ReportReport
Posted on by

Hello,

We have a custom web application that manage events and we try to make it sync with our D365 Marketing Event management system.

Events are created and managed in our custom web app.

Through API, we can retrieve all events of D365 :

GET https://xxx.dynamics.com/api/data/v9.2/msevtmgt_events?$select=msevtmgt_eventid,msevtmgt_name&$count=true

We can also retreive single event (filter by eventid) :

GET https://xxx.dynamics.com/api/data/v9.2/msevtmgt_events?$filter=(msevtmgt_eventid eq xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
or
GET https://xxx.dynamics.com/api/data/v9.2/msevtmgt_events(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

But we are unable to create or update an event :

PATCH https://xxx.dynamics.com/api/data/v9.2/msevtmgt_events(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
data = {
  "msevtmgt_name":"Test",
  "tc_venue":"My best place"
}

(same with data in JSON or form-data format)

We got this error :

The requested resource does not support http method 'PATCH'

And with POST method :

Unmapped Request found, PathTemplate:~/entityset/key, HtppVerb:POST

We try also through webhook :

POST https://xxxxxxxxxxxxxx.svc.dynamics.com/EvtMgmt/api/v2.0/events/{readableEventId}?emApplicationtoken=xxxxxxxxxx
data = {
    "eventName":"Test"
}

And we got 404 error... (same with PATCH method)

Maybe someone has an idea to help us ?

Thanks in advance,

Serge

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi databird,

    I created a web resource and insert it into form to test:

    <html>
    <head>
    <title>test</title>
    <script src="ClientGlobalContext.js.aspx" type="text/javascript"></script>
    <meta><meta><meta><meta><meta><meta><meta></head>
    <body onload="updateEvent()" style="overflow-wrap: break-word;">
    <div>
    test
    </div>
    </body>
    <script type="text/javascript">

    function updateEvent(){
    data = {
    "msevtmgt_name":"Test",
    "msevtmgt_maximumeventcapacity":1
    }
    var uri = "">xxxxxxxx.crm.dynamics.com/.../msevtmgt_events(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)";
    var request = new XMLHttpRequest();
    request.open("PATCH", uri , true);
    request.setRequestHeader("OData-MaxVersion", "4.0");
    request.setRequestHeader("OData-Version", "4.0");
    request.setRequestHeader("Accept", "application/json");
    request.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    request.onreadystatechange = function () {
    if (request.readyState === 4) {
    console.log("success");
    }
    }
    request.send(JSON.stringify(data));
    }
    </script>
    </html>

    And it can work:

    pastedimage1634198554299v1.png

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 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans