Miaosen Wang
Miaosen Wang

Reputation: 430

Filter on Extended Properties using Microsoft Graph

https://graph.microsoft.io/en-us/docs/api-reference/beta/api/singlevaluelegacyextendedproperty_get

In this document, under the "GET resource instances using $filter" section, it has this example:

Get message instance:

GET /me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/propertyId eq '{propertyId_value}' and ep/value eq '{property_value}')

When I tested it using the graph explorer: https://graph.microsoft.io/en-us/graph-explorer

GET https://graph.microsoft.com/beta/me/messages?$filter=singleValueExtendedProperties/Any(ep: ep/propertyId eq 'String {00062008-0000-0000-C000-000000000046} Name TestPropertName' and ep/value ne null)    

I got this exception:

"error": {
"code": "BadRequest",
"message": "Could not find a property named 'propertyId' on type 'microsoft.graph.singleValueLegacyExtendedProperty'.",
"innerError": {
"request-id": "1224fbd4-f033-4897-b1c0-bef1bf3116f8",
"date": "2016-08-12T23:10:57"
} }

Why can the propertyId not be found?

Moreover, I see the same error when calling

GET /me/messages/<id>?$expand=singleValueExtendedProperties($filter=propertyId eq '{propertyId_value}')

Upvotes: 2

Views: 2278

Answers (1)

Angelgolfer-ms
Angelgolfer-ms

Reputation: 336

The propertyId property is actually a known bug and we're in the process of rolling out a fix. The fix is to use the id property instead, and should be available to most customers in the next week, if not already available. The docs will also be updated next week.

Cheers!

Angelgolfer-ms

Upvotes: 3

Related Questions