2015-12-23 32 views
0

我目前正試圖發送一個請求來使用Microsoft Graph API創建一個訂閱郵件,但得到一個錯誤405方法不允許。Microsoft Graph Subscriptions - 方法不允許

我想知道是否有人知道爲什麼會發生這種情況?

這裏是我發送請求:

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帳戶(實時ID)訪問令牌發送,我們目前不支持此類帳戶的訂閱。

+0

你知道這些賬戶什麼時候會大致支持嗎? – user3536057

+0

沒有確定的ETA,但我的粗略估計是春天。 –