I am creating a service that needs to decline events, when certain conditions are met, from a room's perspective and update the event on attendees' calendars.
While declining the meeting is simple, I am struggling to update the event on a user's calendar. I assume that I would do this using update eventMessage.
Right now I have the ID of the event that is declined and I need to associate that event with its eventMessage. Therefore, I am making the following request:
`/users/${roomEmail}/messages?$expand=microsoft.graph.eventMessage/event($select=id;$filter=id eq ${meetingId})`
What I am trying to do is get all messages, then expand so that I see the events associated with each message, then filter each event by its ID until I find the event that I care about. Once I have that event, I can send an update to its eventMessage.
However, I get the error "Parsing Select and Expand failed."
Where am I going wrong?
As the id is not a number value, I believe you may need to add single quotes around the meetingID parameter at the end.
`/users/${roomEmail}/messages?$expand=microsoft.graph.eventMessage/event($select=id;$filter=id eq '${meetingId})'`
https://learn.microsoft.com/en-us/dynamics-nav/using-filter-expressions-in-odata-uris#referencing-different-data-types-in-filter-expressions
Related
I need to get an eventMessage from a user's mailbox that is associated with a specific event.
I have the event's iCalUId but I am unable to filter on it:
/users/${roomEmailAddress}/messages
?$expand=microsoft.graph.eventMessage/event($filter=iCalUId eq '${iCalUId}')
What I am trying to do is get all messages, then expand so that I see the events associated with each message, then filter each event to find the one I care about.
However, I get a response with all events and the filtering mechanism is not working.
Where am I going wrong?
Graph doesn't support including a $filter in the $expand. From the documentation:
$expand:
No support for nextLink
No support for more than 1 level of expand
No support with extra parameters ($filter, $select)
What you can do is leverage the $search parameter to parameter to find all of the event messages ($search="kind:meetings) and then $expand the associated event:
/me/messages?$search="kind:meetings"&$expand=microsoft.graph.eventMessage/event
This worked for me, first I filtered then I expanded list
https://graph.microsoft.com/v1.0/sites/{sideID}/lists/{listID}/items?$filter=fields/{Name of Field} eq '{VALUE}'&$expand=fields
I'm working with Microsoft's Graph API for Outlook calendar events, and I need to fetch the originalStart for exceptions to recurring events on a calendar.
When fetching events using the List events function, I am provided with the events' original start dates, but when I grab a single event using the Get event function, the object returned has no originalStart.
I do receive the event's originalStartTimeZone and originalEndTimeZone, but the original start date is simply missing.
The event resource lists this as a property for events, so I would expect it to be showing up. Any way to get this event without grabbing the entire list of events anew?
I ve checked and confirm originalStart is missing or giving null value. You can look over there as the issue is already known : https://github.com/microsoftgraph/microsoft-graph-docs/issues/4353
I am able to get the originalStart by specifying it in the select query parameter:
https://graph.microsoft.com/v1.0/me/events/<id>?$select=id,subject,originalStart
I'm syncing calendar events using the #microsoft/microsoft-graph-client npm package with the base url /me/calendarview/delta. It's been working fine until a few days ago. For some reason whenever I create a new calendar event in outlook.office.com and my app syncs, the newly created calendar event has the #removed: {reason: "deleted"} field set.
However when I lookup that same calendar event using the Microsoft Graph Explorer that same event does NOT have the #removed field set. Is there any reason a newly created calendar event would look like it's being deleted during a sync?
I'm using #microsoft/microsoft-graph-client v1.3.0
Steps to recreate:
Create an event using the node graph client by POSTing to /me/calendar/events
Grab a delta of calendar events using /me/calendarview/delta with appropriate deltaLink and access token.
I receive 1 calendar event that has 3 fields, #odata.type, id and #removed. The id field matches the id of the created event in step 1.
If you need more information, let me know. This is affecting some of our users.
Update: I tried a workaround for this issue by calling /me/events/<id> for each #removed calendar entry I receive on a delta sync to verify if the event was truly deleted. However when I call that API via the microsoft-graph-client it returns null. If I make the same GET call via MSFT Graph Explorer then the event is returned.
I left an answer on another question here: https://stackoverflow.com/a/65348721/6806302
In short, I went off yesterday on a hunch inspired by #mattlaabs's comment on the question above, that the startDateTime..endDateTime range of the events delta was to blame.
And in practice, that is exactly the problem. The answer is two part:
Changes to events not in the window always show up in the delta stream as #removed.
The events delta parameters are captured in a "closure", meaning subsequent requests (with a $deltatoken) ignore the startDateTime..endDateTime query parameter.
Understanding both of the above, it seems that the answer is to:
Create wide enough initial startDateTime..endDateTime windows to suite your application's needs
Start new events delta streams (by not providing a $deltatoken) at some defined interval instead of reusing the same one indefinitely
I am trying to get the parent message of a threaded reply with the Slack API. When a new reply is put, it has a "thread_ts" attached to it, which corrsponds to its parent message's "ts". I tried to do a searchall with the ts as the query but this didn't work. How would I do this?
See Slack's docs on retrieving a single message with channels.history. This "selecting 1 item from a range" approach should also work with other channel history methods and conversations.history.
The easiest way is to provide the thread_ts value you want to look up as the latest parameter to conversations.history, along with the containing channel ID as channel, and a limit of 1 to ask for a single message. You will need the corresponding *:history scope to make the request.
Example:
GET /api/conversations.history?token=TOKEN_WITH_CHANNELS_HISTORY_SCOPE&channel=C2EB2QT8A&latest=1476909142.000007&inclusive=true&limit=1
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