根據此: http://msdn.microsoft.com/en-us/library/windowsazure/dn424880.aspx 這 http://msdn.microsoft.com/en-us/library/windowsazure/hh974467.aspx通過REST調用查詢在Windows Azure Active Directory的圖形API
我應該可以做一個GET請求
https://graph.windows.net/<my-object-guid>/tenantDetails?api-version=0.9
,我使用招剛開始。在作曲家中設置: 用戶代理:提琴手 主持人:graph.windows.net 授權:持票人eyJ0eXA ....(我的令牌,使用一些來自WAAL的c#來獲取令牌)。
這就是返回
HTTP/1.1 401 Unauthorized
Cache-Control: private
Content-Type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8
Server: Microsoft-IIS/8.0
WWW-Authenticate: Bearer realm="<my-object-guid>", error="invalid_token", error_description="Access Token missing or malformed.", authorization_uri="https://login.windows.net/<my-object-guid>/oauth2/authorize", client_id="00000002-0000-0000-c000-000000000000"
ocp-aad-diagnostics-server-name: 11iIdMb+aPxfKyeakCML7Tenz8Kyy+G8VG19OZB/CJU=
request-id: 99d802a3-0e55-4018-b94d-a8c00ec8f171
client-request-id: 7ed93efd-86c5-4900-ac1f-747a51fe1d8a
x-ms-dirapi-data-contract-version: 0.9
X-Content-Type-Options: nosniff
DataServiceVersion: 3.0;
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
X-Powered-By: ARR/3.0
X-Powered-By: ASP.NET
Date: Tue, 14 Jan 2014 00:13:27 GMT
Content-Length: 129
{"odata.error":{"code":"Authentication_MissingOrMalformed","message":{"lang":"en","value":"Access Token missing or malformed."}}}
當我做一些東西在我的應用程序,所以我不相信的其畸形的令牌被接受。
你有沒有得到這個解決?我遇到了同樣的錯誤 – rwisch45
我不這麼認爲,在我遇到問題後,再也沒有嘗試過。 –