问题
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