microsoftgraph / msgraph-metadata

Microsoft Graph metadata captured and used for generating client library code files.
https://graph.microsoft.com
MIT License
105 stars 31 forks source link

Missing MIME Format Path for `SendMail` and `CreateReply` actions #389

Open peombwa opened 1 year ago

peombwa commented 1 year ago

The API supports sending mail using MIME format by specifying the MIME content as a base64-encoded string in the request body as shown in the example at https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=powershell#example-4-send-a-new-message-using-mime-format:

POST https://graph.microsoft.com/v1.0/me/sendMail Content-type: text/plain

RnJvbTogQWxleCBXaWxiZXIgPEFsZXhXQGNvbnRvc28uY29tPgpUbzogTWVnYW4gQm93ZW4gPE1l Z2FuQkBjb250b3NvLmNvbT4KU3ViamVjdDogSW50ZXJuYWwgUmVzdW1lIFN1Ym1pc3Npb246IFNh bGVzIEFzc29jaWF0ZQpUaHJlYWQtVG9waWM6IEludGVybmFsIFJlc3VtZSBTdWJtaXNzaW9uOiBT YWxlcyBBc3NvY2lhdGUKVGhyZWFkLUluZGV4OiBjb2RlY29kZWNvZGVoZXJlaGVyZWhlcmUKRGF0 ZTogU3VuLCAyOCBGZWIgMjAyMSAwNzoxNTowMCArMDAwMApNZXNzYWdlLUlEOgoJPE1XSFBSMTMw MU1CMjAwMDAwMDAwRDc2RDlDMjgyMjAwMDA5QUQ5QTlASFdIUFIxMzAxTUIwMDAwLmNvZGVudW0u cHJvZC5vdXRsb29rLmNvbT4KQ29udGVudC1MYW5ndWFnZTogZW4tVVMKWC1NUy1IYXMtQXR0YWNo OgpYLU1TLVRORUYtQ29ycmVsYXRvcjoKWC1NUy1Fe

This representation is currently absent in the metadata which leads to downstream tooling and SDKs not generating paths for sending mail in MIME format. Here is the current representation of the OData action in metadata:

<Action Name="sendMail" IsBound="true">
  <Parameter Name="bindingParameter" Type="graph.user" />
  <Parameter Name="Message" Type="graph.message" Nullable="false" />
  <Parameter Name="SaveToSentItems" Type="Edm.Boolean" />
</Action>

Originally reported at https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/844.

andrueastman commented 11 months ago

Including the createReply action as well here.

https://learn.microsoft.com/en-us/graph/api/message-createreply?view=graph-rest-1.0&tabs=csharp#example-2-create-a-draft-message-in-mime-format-to-reply-to-an-existing-message

Originally reported at https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1802