我在Skype for bussiness中拥有用户@域访问权限。 我第一次要求lyncdiscover给我一个json答案
GET https://lyncdiscover.shockw4ves.onmicrosoft.com/
{
"_links": {
"self": {
"href": "https://webdir1e.online.lync.com/Autodiscover/AutodiscoverService.svc/root?originalDomain=shockw4ves.onmicrosoft.com"
},
"user": {
"href": "https://webdir1e.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user?originalDomain=shockw4ves.onmicrosoft.com"
},
"xframe": {
"href": "https://webdir1e.online.lync.com/Autodiscover/XFrame/XFrame.html"
}
}
}
接下来请求user
链接
GET https://webdir1e.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user?originalDomain=shockw4ves.onmicrosoft.com
Answer:
Cache-Control → no-cache
Content-Length → 1293
Content-Type → text/html
Date → Fri, 02 Oct 2015 12:47:08 GMT
WWW-Authenticate → Bearer
trusted_issuers="00000001-0000-0000-c000-000000000000@*",
client_id="00000004-0000-0ff1-ce00-000000000000",
authorization_uri="https://login.windows.net/common/oauth2/authorize",
MsRtcOAuth
href="https://webdir1e.online.lync.com/WebTicket/oauthtoken",
grant_type="urn:microsoft.rtc:passive,urn:microsoft.rtc:anonmeeting"
X-Content-Type-Options → nosniff
X-MS-Correlation-Id → 2147515548
X-MS-Server-Fqdn → AMS1E01EDG04.infra.lync.com
client-request-id → eb37ab92-78a7-4f47-bc79-2d1fcad90b99
服务器仅返回urn:microsoft.rtc:passive
和urn:microsoft.rtc:anonmeeting
,而不是password
。
好的,我尝试使用urn:microsoft.rtc:passive
:
POST https://webdir1e.online.lync.com/WebTicket/oauthtoken
grant_type=urn:microsoft.rtc:passive
Answer:
Content-Length → 1293
Content-Type → text/html
Date → Fri, 02 Oct 2015 13:05:11 GMT
X-Content-Type-Options → nosniff
X-MS-Correlation-Id → 2147515642
X-MS-Server-Fqdn → AMS1E01EDG02.infra.lync.com
X-Ms-diagnostics →
28048;source="AMS1E01EDG02.infra.lync.com";
reason="The user is not signed in with WS Federation Passive credentials."
client-request-id → b4a39398-0089-44f6-bdfb-768902f7289d
Answer body:
401 - Unauthorized: Access is denied due to invalid credentials.
You do not have permission to view this directory or page using the
credentials that you supplied
用户未使用WS Federation Passive凭据登录。如何获得此凭证?