小编Nik*_*ali的帖子

Microsoft Graph API - SendMail http 400 - API url from documentation not working

My application sends email using Microsoft Graph. We followed the documentation, this was working as expected for almost a year:

https://graph.microsoft.com/v1.0/users/me/microsoft.graph.sendmail
Run Code Online (Sandbox Code Playgroud)

Since 3/8/2019, the same code sendmail API in PROD started failing with the HTTP 400 - Bad Request:

{
  "error": {
    "code": "TargetIdShouldNotBeMeOrWhitespace",
    "message": "Id is malformed.",
    "innerError": {
      "request-id": "0de5a4eb-dac4-4d98-a4b4-178e503a6657",
      "date": "2019-03-19T17:16:20"
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

As a part of the investigation, we found that the SendMail documentation has a different URL used in the examples than …

microsoft-graph microsoft-graph-mail

10
推荐指数
1
解决办法
242
查看次数