javascript - How to get authorization to UCWA and Skype Web SDK? -
i have skype business account call art@shockw4ves.onmicrosoft.com , i'm trying authorization.
- my first request lyncdiscover service
get https://lyncdiscover.shockw4ves.onmicrosoft.com/
answer:
{ "_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" } } }
- then take
user
link , next request
get https://webdir1e.online.lync.com/autodiscover/autodiscoverservice.svc/root/oauth/user?originaldomain=shockw4ves.onmicrosoft.com
answer: 401 unauthorized
cache-control → no-cache content-length → 1293 content-type → text/html date → wed, 30 sep 2015 11:16:37 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 → 2147499790 x-ms-server-fqdn → ams1e01edg08.infra.lync.com client-request-id → ea4f5098-732f-4feb-ae34-cf6ff7fc1a73
- this response contains credentials data. take authorization uri , next request
post https://login.windows.net/common/oauth2/authorize body of x-www-form-urlencoded: grant_type=password username=art@shockw4ves.onmicrosoft.com password=xxxxxxxxxx client_id=00000004-0000-0ff1-ce00-000000000000 answer: <html> <head> <title>continue</title> </head> <body> <form method="post" name="hiddenform" action="https://login.microsoftonline.com/common/oauth2/authorize"> <input type="hidden" name="grant_type" value="password" /> <input type="hidden" name="username" value="art@shockw4ves.onmicrosoft.com" /> <input type="hidden" name="password" value="xxxxxxxxx" /> <input type="hidden" name="client_id" value="00000004-0000-0ff1-ce00-000000000000" /> <noscript> <p>script disabled. click submit continue</p> <input type="submit" value="submit" /> </noscript> </form> <script language="javascript">window.settimeout('document.forms[0].submit()', 0);</script> </body> </html>
- copy html form , run in browser. redirect https://login.microsoftonline.com/common/oauth2/authorize , open page error text:
sign in sorry, we’re having trouble signing in. received bad request. additional technical information: correlation id: 0669eee8-0dc5-4aa1-a94d-41e5bbc2f25d timestamp: 2015-09-30 14:06:30z aadsts50011: no reply address registered application.
what wrong? test with:
grant_type=password grant_type="urn:microsoft.rtc:passive,urn:microsoft.rtc:anonmeeting" grant_type="urn:microsoft.rtc:windows,urn:microsoft.rtc:anonmeeting,password"
what error no reply address registered application ?
there few problems. second step's 401 response contains www-authenticate header grant_type="urn:microsoft.rtc:passive,urn:microsoft.rtc:anonmeeting" means authentication allowed via passive or anonmeeting. in step 3 request trying use unsupported grant type, password.
the account in question looks/feels associated office365/lync online means there isn't current support ucwa. if supported need looking @ how authenticate using passive authentication, authentication in ucwa, not documented right now.
Comments
Post a Comment