I'm having trouble authenticating to S4BO. I have registered my app (in azure portal) and it's working correclty with the webSDK demo at https://ucwa.skype.com/websdk The process I follow is the following one:
I do a OAuth link redirect with the following code:
https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&resource=https://webdir.online.lync.com&redirect_uri=http://myurl.dev/skypeGet the auth code that has been returned and use it to generate an access token:
POST https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id=db01d1f5-f2a3-4d82-b4bc-6b3b4071d7df&resource=https://webdir.online.lync.com&redirect_uri=http://acme.intranet.dev/skype grant_type=authorization_code code=$thecodehere client_id=$clientidhere client_secret=$clientsecrethere redirect_uri=$sameuriasbeforeAfter this I have my access token. Now I need my user url. So I do autodiscover
GET https://lyncdiscover.mydomain.onmicrosoft.com
and I receive a result something like:
{
"_links": {
"self": {
"href": "https://webdir1e.online.lync.com/Autodiscover/AutodiscoverService.svc/root?originalDomain=mydomain.onmicrosoft.com"
},
"user": {
"href": "https://webdir1e.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user?originalDomain=mydomain.onmicrosoft.com"
},
"xframe": {
"href": "https://webdir1e.online.lync.com/Autodiscover/XFrame/XFrame.html"
}
}
}
I try to log in at the user url:
GET https://webdir1e.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user?originalDomain=mydomain.onmicrosoft.com HEADERS: Authorization: Bearer + theAccessTokenFromAbove Referer: https://webdir1e.online.lync.com/Autodiscover/XFrame/XFrame.html
And after this I get 403 Unathorized. Where am I going wrong?