Can't filter Schema Extension on Messages

Mike Jackson 1 Reputation point
2021-04-21T21:51:19.103+00:00

Hi Everyone,

I'm having an issue filtering Custom Data (schema) on Messages.

I have added a new Schema Extension with the following info:

id: extmxycdgd8_testing
Properties: "name": "testingId",
"type": "String"

I successfully insert the data in the schema on one of the messages with the value "yes"
Message ID for example is "message1"

When I run the following query:
https://graph.microsoft.com/v1.0/me/messages?$filter=extmxycdgd8_testing/testingId eq 'yes'

I'm expecting Message1 to be return but instead I get the following error:

"code": "RequestBroker--ParseUri",
"message": "Could not find a property named 'e2_51c6f317b29f4d7eaa423d6f4f8bebc1_extmxycdgd8_testing' on type 'Microsoft.OutlookServices.Message'.",

I'm not sure why this query adds "e2_51c6f317b29f4d7eaa423d6f4f8bebc1_" to the string (using the Microsoft Graph Explorer for this test) but I'm suppose to get
ID "message1" returned.

Again, I'm not sure what I am doing wrong here.

Please help.

Mike J.

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Glen Scales 4,446 Reputation points
    2021-04-22T00:30:55.807+00:00

    As per https://learn.microsoft.com/en-us/graph/known-issues#extensions

    Filtering on schema extension properties not supported on all entity types Filtering on schema extension properties (using the $filter expression) is not supported for Outlook entity types - contact, event, message, or post.

    Using extended properties https://learn.microsoft.com/en-us/graph/api/resources/extended-properties-overview?view=graph-rest-1.0 is probably a better way to go until they support schema extensions in filters

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.