I try to search an email message via MS Graph Search API below,
https://learn.microsoft.com/en-us/graph/search-concept-messages#response
However it doesn't return a message body. The closest is a bodyPreview field, but it's not enough for me since I want to feed the search results as a source of RAG to LLM.
Are there any ways to retrieve a body of an email message?
==EDIT==
I realized that hitId is actually a message id, so I can retrieve a full message via Get message API.
https://learn.microsoft.com/en-us/graph/api/message-get?view=graph-rest-1.0&tabs=http
Is this an only way to get a body of a message? So do I need to retrieve a message one by one?
You are right, to get full details about the message, you need to use hitId
and call
https://graph.microsoft.com/v1.0/me/messages/{hitId}
Message's body is never returned by /v1.0/search/query
for performance reason.