Microsoft graph API: finding event by iCalUid - microsoft-graph-api

I would like to decline one instance of recurring meeting. I only have masterSerieId, iCalId, time of that instance.
Do you know how I could cancel that instance?
Do I have to query using masterId and time of the instance to find event id or there is a way I would just find eventId using iCalId?

You can use OData query options to filter on just the event that has that particular iCalUId.
For instance:
GET https://graph.microsoft.com/v1.0/me/events?$filter=iCalUId eq '<your iCalUId>'

Sadly the calendar view endpoint does not include events which are part of an event series if you match against a given iCalUId.
So if an event has a seriesMasterId which is not null, you wont find it by filtering for the iCalUId.

Related

MS Graph API - how to retrieve declined events?

Let's say person B sends a calendar event invite to person A. When we then run the following query for person A, we can see the event in the response with responseStatus.response="notResponded", which is fine:
https://graph.microsoft.com/v1.0/me/events?startDateTime=2023-01-11T23%3A00%3A01.000Z&endDateTime=2023-01-12T23%3A00%3A00.000Z
However, when person A declines the invitation, then the event disappears from the response.
Is there a way to modify the query or use a different endpoint to still have access to the declined events?
I tried to look for the solution in the MS Graph API docs, but couldn't find any hints.
responseStatus property doesn't support filtering but as an alternative you can use extended property PidLidResponseStatus and filter those events with PidLidResponseStatus equals to respDeclined int value 4.
https://graph.microsoft.com/v1.0/me/events?startDateTime=2023-01-11T23%3A00%3A01.000Z&endDateTime=2023-01-12T23%3A00%3A00.000Z&$filter=singleValueExtendedProperties/any(ep:ep/id eq 'Integer {00062002-0000-0000-C000-000000000046} Id 0x8218' and cast(ep/value, Edm.Int32) eq 4)
But if declined event is remove from the calendar then it cannot be listed.
Documentation:
PidLidResponseStatus

How to find an event in EventStore by it Id?

Currently I'm using Eventstore (by Greg Young) for my company project. In my read model, I store the processed event ids, not the event name. How can I find the event in Eventstore using its Id?
I don't think this is possible currently. I think you have two choices:
in your read model store the stream and index, or the commit/prepare position of the event and then read the event from either the $all stream using the commit/prepare position or from the stream it was written to using the stream and index. This is probably the simplest.
Or create a projection in event store which indexes the events by their id and reprojects into a stream called, say, eventid-{event.id} then you can read directly from this stream.
The second is backwards compatible with your current read model, but I'm not sure is the right thing to do, as projections cause write amplification, and you probably need to make sure you exclude system events from being projected.
You can query the event using the following URL path. This will return the event and the last 20 events before it
{youreventstoredomain}:2113/web/index.html#/streams/$ce-{streamname}/{eventnumber}/backward/20

How to retrieve the events from Calendar when using the $expend parameter in MS Graph API?

I want to get the events in the a specific user's calendar by using the MS Graph API. I have used the API GET https://graph.microsoft.com/v1.0/me/calendars?$expend=events, However, it does not work. The events collection is null. And there are some event in my calendar.
Anyone can help?
According to your description, I assume you want to list the events in a specific user's calendar.
Based on my test, we can use the following code:
public async Task<ICollection<Event>> EventsAsync(string calendarId)
{
var events = await _serviceClient.Me.Calendars[calendarId].Events.Request().GetAsync();
return events.CurrentPage;
}
As the event is a relationships of the calendar, so the event will be null when we request a calendar. However, according to this document:
Note: Not all relationships and resources support the $expand query parameter. For example, you can expand the directReports, manager, and memberOf relationships on a user, but you cannot expand its events, messages, or photo relationships. Not all resources or relationships support using $select on expanded items
So we need request the GET /users/{id | userPrincipalName}/calendars/{id}/eventsendpoint

How to get the last inserted row via Odata service

Update:
Using ODATA, How to get the last inserted row in /MySet where MySet.Name = "abc".
I do not want to continuously poll the odata service via model.read(). I know attachChange() or attachDataReceived()methods can be use to get notified automaically. But apart from notification, how to get the 'inserted row'. Also My doubt is how to satisfy the following three conditions here : $top=1, $orderby= Date desc and $filter=NAME eq 'ABC'
The only solution I can think of is to get notified by data inserted via attachDataReceived() and then make a model.read() call with the required filters and additional parameters. Although this would result in these additional 'read' calls.
Original Post Below:
Question: How to pass filters in element binding?
Post: I am using odata service for populating my views.
I want to pass certain filters like $filter=NAME eq 'Scott'
Since I want these parameters to be included only when with odata request for a specific ui-element, I want to include them in bindElement()
specifically something like this
var myFilter = new Array();
myFilter.push(new sap.ui.model.Filter("NAME", sap.ui.model.FilterOperator.EQ, 'Scott'));
var myStandardTile = this.byId("__tile3");
myStandardTile .bindElement("/MySet",{filters:myFilter});
But unfortunately this does not works. When I see the 'network' tab in developer console, Filters are not being added with my request.
You cannot. Neither filter nor sorter nor formatter are supported by element bindings. They are only supported by list and tree bindings.

Eventbrite VenueID is missing

I am making a call to;
https://www.eventbrite.com/xml/organizer_list_events?id=MYID
and getting a collection of event returned. I am integrating this data into an internal event system.
However, periodically I will get a venue without an ID. This means I cant add the venue into the system as I have no way of checking for duplicates before it is imported.
Show the VenueID always be returned? If not, under what circumstances would it not be returned?
The venue Id will not be returned if there is no venue, e.g. if the event is a webinar / online only event or the venue is not yet chosen

Resources