Hi @Chukwuma Obi ,
Using Search message graph API endpoint, bodyPreview
is of type string and it will contain the first 255 characters of the message body. It is in text format. And body
is of type "@odata.type": "microsoft.graph.itemBody"
which cannot be retrived through search result even by using search-api-overview-get-selected-properties.
To get the message body, First we have to call the we have to call the search query message graph API and get the hitid property of respective message from the response then use hitid in messages graph API call.
POST /search/query
{
"requests": [
{
"entityTypes": [
"message"
],
"query": {
"queryString": "paul@abc.com"
}
}
]
}
- Subsequently make another
GET /me/messages/{hitId}
to get the message body in HTML format hitId returned in previous call.
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".