Microsoft Graph 订阅 - 不允许的方法
Microsoft Graph Subscriptions - Method not Allowed
我目前正在尝试使用 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"
}
}
}
回复Headers:
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"}}
订阅实体 set/functionality 当前仅供 Azure Active Directory 用户访问。您的请求是使用 Microsoft 帐户 (Live Id) 访问令牌发送的,我们目前不支持此类帐户的订阅。
我目前正在尝试使用 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"
}
}
}
回复Headers:
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"}}
订阅实体 set/functionality 当前仅供 Azure Active Directory 用户访问。您的请求是使用 Microsoft 帐户 (Live Id) 访问令牌发送的,我们目前不支持此类帐户的订阅。