Microsoft Graph API: Cancel recurring events - microsoft-graph-api

I am currently try to use the Microsoft Graph API to cancel a set of recurring meetings using the following call:
POST /users/{prinicipalName}/calendar/events/{id}/cancel
And I am getting back Unsupported segment type error.
I can delete events one at a time, but I need a way to cancel all events in a recurrence. Any help would be much appreciated.

There isn't a /cancel endpoint.
If you want to remove recurrences from a meeting, you need to set the recurrence pattern to null:
PATCH https://graph.microsoft.com/v1.0/users/{userPrincipalName}/events/{id}
Content-type: application/json
{
"recurrence": null,
}

Related

Updating isOnlineMeeting in M365 event via MS Graph

What I'm doing is creating a calendar event in M365 via the EWS API. I want to set isOnlineMeeting and onlineMeetingProvider, but those properties are not writable in EWS. So my idea was to take the itemId of the new event, and use Microsoft Graph to update just those two properties. I had to alter the itemId a bit to get Graph to accept it (changed / to -) but it appears to "work" in the sense that the PATCH command comes back with response 200. But the properties do not get modified. Here is the json that I give to the PATCH command:
{
"isOnlineMeeting": true,
"onlineMeetingProvider": "teamsForBusiness"
}
Here is the URL (shortened for brevity):
PATCH /v1.0/users/me/calendars/AQMkAG.../events/AAMkAG...
As I said, the http response code is 200. The output from the PATCH is a listing of all of the event properties. The ones I am trying to modify are unchanged. The funny thing is, I could have sworn I had this working last week, but my tests this week all fail. Any ideas?

Microsoft Graph API GET onlineMeeting via joinUrl

Current using Microsoft Graph API v1.0 to create onlineMeetings via POST /me/events. Reason being, if you create an onlineMeeting directly and add a user in the meeting, it doesn't create a calendar event.
The params I use for that call is:
:isOnlineMeeting => true,
:onlineMeetingProvider => "teamsForBusiness"
Which works great and returns a joinUrl under onlineMeetings.
However, I'd like to pull attendance data from the GET onlineMeeting route to get attendance information since the attendees section of the event only seems to return users that were added to the actual event, not who attended the actual onlineMeeting.
I have tried doing a get request like such:
/v1.0/me/onlineMeetings?$filter=joinWebUrl%20eq%20'https://whateverthejoinurlis'
but the response says it's not a valid filter.
Any guidance would be appreciated.
Posting the Answer for better knowledge
Copying from #Shiva Keshav Varma comments
Try it in beta version
/beta/me/onlineMeetings?$filter=joinWebUrl%20eq%20'https://whateverthejoinurlis
You can also get the attendeereport using beta/users/{userId}/onlineMeetings/{meetingId}/attendeeReport as specified in the document.

Microsoft Outlook Calendar Graph API delta is not returning deleted events?

I'm currently using the Microsoft Graph API to sync calendar events to my local application. It seems to be working fine, except I don't seem to be able to retrieve deleted events. I'm following the instructions for the delta query as laid out by Microsoft here. Those instructions specifically say "By using delta query, you can get new, updated, or deleted events in a calendar view," and in the examples there is an event in the sample response that is deleted.
In my testing, however, I am never able to receive any deleted events. I create an event and call /me/calendarView/delta?startDateTime={start_datetime}&endDateTime={end_datetime} and I can see the event. Then I delete the event, make the same call, and the response is empty. I've tried using the deltaToken call, just to be sure I'm getting the events that have changed since my last call, and it does return the deleted event as expected. But I would prefer not to use that, as it requires that my start/end dates always be the same.
Am I just completely missing the point of the delta call, or am I doing something wrong in calling it?
I am using the services as shown here
https://learn.microsoft.com/en-us/graph/delta-query-events
GET /me/calendarView/delta?startDateTime={start_datetime}&endDateTime={end_datetime}
And I am not getting the deleted events when running it using the delta token as shown in the example
https://learn.microsoft.com/en-us/graph/delta-query-events#the-next-round-sample-first-request
...
{
"#odata.type": "#microsoft.graph.event",
"id": "AAMkADk0MGFkODE3LWE4MmYtNDRhOS04OGQLkRkXbBznTvAADb6ytyAAA=",
"#removed": {
"reason": "deleted"
}
},
...
I always get an empty delta response
eg
https://graph.microsoft.com/v1.0/me/calendarView/delta?$deltatoken=R0usmcdvmMuZCBYV0hguCFHvWbSXF
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(event)",
"#odata.deltaLink": "https://graph.microsoft.com/v1.0/me/calendarView/delta?$deltatoken=R0usmcdvmMuZCBYV0hguCFHvWbSXF-PYk6UEH7m4ZdZmSbEIlouKElB10k31BdGZZJ1Os2i",
"value": []
}
You can only obtain deleted items using /delta queries. When calling /calendarView it will give you only the current calendar, not previous iterations of that calendar.

Office 365 - Filter on expanded messages

Thanks to How do I retrieve the event for an eventMessage we've sucessfully retrieve now the events in our inbox on o365.
Now our problem is that we want to show the user only events to which he hasn't responded. We've tried things like:
$expand=Microsoft.OutlookServices.EventMessage/Event($filter=ResponseStatus/Response%20eq%20'NotResponded')
But without success, we still get accepted events. If we try to put it outside in a filter
$filter=Microsoft.OutlookServices.EventMessage/Event/ResponseStatus/Response%20eq%20'NotResponded'
we get an error like "message": "The query filter contains one or more invalid nodes."
Is there an easy way to achieve that without a filtering inside the application?
It seems that ResponseStatus/Response is marked as not filterable, so this cannot be achieved in this fashion

JIRA REST API issue transitions and worklog (v4.4.1)

Is it possible to update the worklog for an issue when transitioning (i.e. POST to /rest/api/latest/issue/{issueid}/transitions) via the REST API for JIRA (API version is 2.0.alpha1 of JIRA v4.4.1)? I'm posting a worklog as part of the request and looking for the minimum information I need to send (currently just minutesSpent and started time as these seem to be the only mandatory ones via the UI).
i.e.
worklog:
{
name: "worklog",
type: "worklog",
value: [
{
started: "2012-10-01T10:28:00.000+1000",
minutesSpent: 480
}
]
},
Currently the post to the URL seems to just ignore this additional data although the transition does take effect with a desired 204 response.
From the JIRA REST API Docs:
The fields that can be set on transtion, in either the fields parameter or the update parameter can be determined using the /rest/api/2/issue/{issueIdOrKey}/transitions?expand=transitions.fields resource. If a field is not configured to appear on the transition screen, then it will not be in the transition metadata, and a field validation error will occur if it is submitted.
If, in the response you get from the expansion, you don't see worklog, then I don't think it is possible.

Resources