Expanding and Filtering MS Graph API Does Not Work

随声附和 提交于 2020-01-05 04:10:07

问题


I need to get an eventMessage from a user's mailbox that is associated with a specific event.

I have the event's iCalUId but I am unable to filter on it:

/users/${roomEmailAddress}/messages
?$expand=microsoft.graph.eventMessage/event($filter=iCalUId eq '${iCalUId}')

What I am trying to do is get all messages, then expand so that I see the events associated with each message, then filter each event to find the one I care about.

However, I get a response with all events and the filtering mechanism is not working.

Where am I going wrong?


回答1:


Graph doesn't support including a $filter in the $expand. From the documentation:

$expand:

  • No support for nextLink
  • No support for more than 1 level of expand
  • No support with extra parameters ($filter, $select)

What you can do is leverage the $search parameter to parameter to find all of the event messages ($search="kind:meetings) and then $expand the associated event:

/me/messages?$search="kind:meetings"&$expand=microsoft.graph.eventMessage/event


来源:https://stackoverflow.com/questions/59232471/expanding-and-filtering-ms-graph-api-does-not-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!