Skip to content

HowTo / Sample to reply to a mail #749

@Julien-Des

Description

@Julien-Des

Hi,

I am struggeling to reply to a mail with Graph (SDK powershell) and cannot find samples on internet.
Do you have some to share ?

I have tried New-MgUserMessageReply, New-MgUserMessageReplyAll and New-MgUserMailFolderMessageReplyAll that have to return a Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMessage1 according to the doc
-> the output of these functions is always empty

My code

$resp = New-MgUserMessageReply -MessageId $mail.Id -Message $Message -UserId $UserId
Send-MgUserMessage -MessageId $resp.Id -UserId $UserId

The output

Send-MgUserMessage: Cannot bind argument to "MessageId" parameter because it is an empty string. 
Send-MgUserMessage -MessageId $resp.Id -UserId $UserId
CategoryInfo          : InvalidData : (:) [Send-MgUserMessage], ParameterBindingValidationException
FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Send-MgUserMessage

AB#10173

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions