Running sample app fails with unsupported segment type
Downloaded and started the stock Node.JS sample app from the site: http://dev.office.com/getting-started/office365apis
Connected to my account, any attempt to send the email fails with this in the terminal:
400
Bad Request
Response: {
"error": {
"code": "BadRequest",
"message": "Unsupported segment type.",
"innerError": {
"request-id": "95b3a68d-e2ae-44fa-b192-53a5c350542b",
"date": "2016-02-19T22:03:12"
}
}
}
Send mail status code: 400
Hey @philipodonnell
I tried both versions and you're right, the one from dev.office.com crashes. The one from this repo works fine.
I noticed that the sample from http://dev.office.com/getting-started/office365apis has the following in routes/index.js line 89:
requestUtil.postData('graph.microsoft.com', '/v1.0/me/sendMail'...
That same line from this repo has the following:
requestUtil.postData('graph.microsoft.com', '/v1.0/me/microsoft.graph.sendMail'...
If you update the endpoint to microsoft.graph.sendMail it works okay.
Let me know if that solves the issue. If so, I'll contact the people at dev.office.com to update their package.
Thank you for trying this sample.
@ricalo That worked great, thanks so much for pointing out the diff.
No problem, thank you for letting is know :+1:
@Ricalo should we loop in @keyur32 to aid us in getting this updated in the Getting Started exp?
Yes, @jamescro already notified him. A fix is in the way. Thanks for the reminder, @iambmelt