Microsoft Graph订阅-不允许的方法 [英] Microsoft Graph Subscriptions - Method not Allowed

查看:113
本文介绍了Microsoft Graph订阅-不允许的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试发送使用Microsoft Graph API创建消息订阅的请求,但出现错误405方法不允许.

I am currently trying to send a request to create a subscription to messages using the Microsoft Graph API, but am getting an error 405 Method Not Allowed.

我想知道是否有人知道为什么会这样?

I was wondering if anyone had an idea why this was happening?

这是我发送的请求:

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

推荐答案

当前仅Azure Active Directory用户可以访问订阅实体集/功能.您的请求是使用Microsoft帐户(实时ID)访问令牌发送的,我们目前不支持此类帐户的订阅.

The subscriptions entity set/functionality is currently only accessible to Azure Active Directory users. Your request was sent with a Microsoft Account (Live Id) access token and we don't currently support subscriptions for such accounts.

这篇关于Microsoft Graph订阅-不允许的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆