Chris D
Chris D

Reputation: 134

How to filter Microsoft Graph events by OpenTypeExtensions

There seem to be plenty of examples of filtering by single and multiValueExtendedProperties in Microsoft Graph but these seem to be legacy. How do you filter by an OpenTypeExtension created like so?

ev.Extensions.Add(new OpenTypeExtension() { 
   AdditionalData = bag, 
   Id = Constants.LibraryId 
});

The ultimate goal is to filter events by whether our library created them.

Upvotes: 1

Views: 1164

Answers (1)

Dmitry Pimenov
Dmitry Pimenov

Reputation: 739

Did you create these as Schema extensions (registering the shape of the extension in advance), or as open extensions? In order to use the filter operation on extended properties, you'll need to be using Schema extensions. In that case, you can filter as you normally would on an resource's property (eg. ~/me/messages?$filter=myExtension/favoriteColor eq 'green'). Here is more information about creating schema extensions on Graph resources.

Upvotes: 1

Related Questions