This question is a follow-up to Get custom property set in Outlook Add-In via Microsoft Graph.
My Outlook Office.js add-in is adding some custom properties to an ev
After several tries I found a way to filter for events/messages that have a custom property regardless it's value:
https://graph.microsoft.com/v1.0/me/events/?$filter=singleValueExtendedProperties/any(ep: ep/id eq 'String {00020329-0000-0000-C000-000000000046} Name cecp-b7ff386a-234a-4a38-84bc-e5ae4684b7af' and ep/value ne null)
with the added important part being and ep/value ne null
, whereas something like and ep/value ne 'fooo'
didn't work, it just returned everything.
Above filtering works also for filtering of events for which we want subscribe to push events.
I believe the filter query should be
PropertyId eq ....
instead of Id eq ...