Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,344 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
While returning the MessageCollectionResponse through MS graph client, why attachments are not reading by default. Then, how to get attachments with a message. In mail, I'm having attachments, but not in message collection.
Hi @Dinesh K
Attachments are not a basic property of the message endpoint and are not returned when you get the message, but you can extend the attachment endpoint when you get the message.
var result = await graphClient.Me.Messages["{message-id}"].GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Expand = new string []{ "attachments" };
});
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.