我目前正在尝试使用Microsoft Graph API发送创建订阅邮件的请求,但收到错误405方法不允许。
我想知道是否有人知道为什么会这样?
以下是我发送的请求:
POST https://graph.microsoft.com/beta/subscriptions
Content-type: application/json
Content-length: 208
{
"changeType": "Created",
"notificationUrl":"https://webhook.azurewebsites.net/api/send/myNotifyClient",
"clientState": "subscription-identifier",
"resource": "me/messages"
}
然后是响应:
{
"error": {
"code": "MethodNotAllowed",
"message": "Method not allowed.",
"innerError": {
"request-id": "a61ece92-7b7f-4693-b047-80c419ebde23",
"date": "2016-01-06T11:13:02"
}
}
}
响应标题:
Access-Control-Allow-Origin → *
Allow → GET
Cache-Control → private
Content-Type → application/json
Date → Wed, 06 Jan 2016 11:13:02 GMT
Duration → 58.558
OutBoundDuration → 0
Server → Microsoft-IIS/8.5
Transfer-Encoding → chunked
X-Powered-By → ASP.NET
client-request-id → a61ece92-7b7f-4693-b047-80c419ebde23
request-id → a61ece92-7b7f-4693-b047-80c419ebde23
x-ms-ags-diagnostic → {"ServerInfo":{"DataCenter":"NorthEurope","Slice":"SliceB","ScaleUnit":"001","Host":"AGSFE_IN_4","ADSiteName":"DUB"}}
答案 0 :(得分:1)
订阅实体集/功能目前只能由Azure Active Directory用户访问。您的请求是使用Microsoft帐户(Live Id)访问令牌发送的,我们目前不支持此类帐户的订阅。