Reply to the sender of a message, add a comment or modify any updateable properties all in one reply call.
The message is then saved in the Sent Items folder.
Alternatively, you can first create a draft reply message to include a comment or update any message properties,
and then send the reply.
Note
You can specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.
If the replyTo property is specified in the original message, per Internet Message Format (RFC 2822),
you should send the reply to the recipients in replyTo and not the recipient in the from property.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
Mail.Send
Delegated (personal Microsoft account)
Mail.Send
Application
Mail.Send
HTTP request
POST /me/messages/{id}/reply
POST /users/{id | userPrincipalName}/messages/{id}/reply
POST /me/mailFolders/{id}/messages/{id}/reply
POST /users/{id | userPrincipalName}/mailFolders/{id}/messages/{id}/reply
Request headers
Name
Type
Description
Authorization
string
Bearer {token}. Required.
Content-Type
string
Nature of the data in the body of an entity. Required.
Request body
In the request body, provide a JSON object with the following parameters.
POST https://graph.microsoft.com/v1.0/me/messages/AAMkADA1MTAAAAqldOAAA=/reply
Content-Type: application/json
{
"message":{
"toRecipients":[
{
"emailAddress": {
"address":"samanthab@contoso.onmicrosoft.com",
"name":"Samantha Booth"
}
},
{
"emailAddress":{
"address":"randiw@contoso.onmicrosoft.com",
"name":"Randi Welch"
}
}
]
},
"comment": "Samantha, Randi, would you name the group please?"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var message = new Message
{
ToRecipients = new List<Recipient>()
{
new Recipient
{
EmailAddress = new EmailAddress
{
Address = "samanthab@contoso.onmicrosoft.com",
Name = "Samantha Booth"
}
},
new Recipient
{
EmailAddress = new EmailAddress
{
Address = "randiw@contoso.onmicrosoft.com",
Name = "Randi Welch"
}
}
}
};
var comment = "Samantha, Randi, would you name the group please?";
await graphClient.Me.Messages["AAMkADA1MTAAAAqldOAAA="]
.Reply(message,comment)
.Request()
.PostAsync();