10

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

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"
    }
  }
}

As a part of the investigation, we found that the SendMail documentation has a different URL used in the examples than the API help section. We were successful when calling this URL:

https://graph.microsoft.com/v1.0/me/sendmail

Questions:

  1. Clearly looks like there was some update on the Graph API happened around 3/8/2019 that disabled working of the earlier URL

  2. Documentation has 2 URL's that are misleading/confusing: one is the API help section and one in examples. As of now the API URL in the help section is no longer working. That should be fixed with the correct URL to be used.

  3. Why was such breaking change like this introduced that caused a PROD outage for our application?

  4. What is the official channel to get these changes?

Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
  • 1
    The URL has always been `/me`, not `/user/me`, and the docs page reflects this. See the example on the page. – Hong Ooi Mar 25 '19 at 07:37
  • 1
    and if you see a problem with the documentation, microsoft has some nice github intergration on their documentation page. So be sure to create an issue their. – Stephan May 14 '19 at 14:05

2 Answers2

1

The correct URI is https://graph.microsoft.com/v1.0/me/microsoft.graph.sendmail (not /me)

Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
0

The correct API route is: https://graph.microsoft.com/v1.0/me/sendMail

You can find more practical samples here: https://developer.microsoft.com/en-us/graph/graph-explorer#

Saeed
  • 182
  • 2
  • 8