Skype for Business online WebSDK sign in

Copper Contributor

Hi,

 

I'm trying to use Skype for Business online WebSDK. I'm following the instructions located here - https://msdn.microsoft.com/Skype/WebSDK/docs/DevelopWebSDKappsForSfBOnline.
I'm trying to authenticate user with Office 65 online but I have problems while executing app.signInManager.signIn command.


Browser sends several requests:

1. Request URL:https://webdir.online.lync.com/autodiscover/autodiscoverservice.svc/root
Request Method:GET
Status Code:200 OK

 

2. Request URL:https://webdir2e.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user
Request Method:OPTIONS
Status Code:200 OK

 

3. Request URL:https://webdir2e.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user
Request Method:GET


Status Code:401 Unauthorized

The last request is failing with an error:
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.

 

I'm authenticating with admin user and with an account that has Skype for Business online subscription.

Can you help me with this problem? What am I doing wrong? Are there any other prerequisites to be able to successfully log in?

3 Replies
Hey Roman,

Did you get anywhere with this? Having the same problem.

Cheers
Sam

Hi Sam,

 

I solved the problem. I described it here https://stackoverflow.com/questions/41667130/skype-for-business-online-websdk-sign-in.

 

But I can copy answer here:

 

I did everything from scratch following the guide here https://github.com/OfficeDev/skype-web-sdk-simple-sample-for-SfB-online. Created a Microsoft account, got a free O365 tenant, signed up for free Azure Active Directory trial account. Associated my O365 account with Azure AD as described here https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#associate-your.... Then I registered the new app in Azure Active Directory to use Skype for Business. Then I updated config.js in the skype web sdk simple sample for SfB online application. And again no luck, the same error - 401 - Unauthorized: Access is denied due to invalid credentials

 

I was trying to run the index.html page on the localhost in the htdocs/skype directory. Of course I was setting the reply url accordinly as http://localhost/skype/index.html. Then I tried to move everything in skype directory to the root - to the htdocs folder. And also changed reply url to http://localhost/index.html. And very strangly but it helped. Now I can successfully login using Skype WebSDK. I don't know the reason for why it is working only this way. If someone have an idea you are welcome to comment

 

---------------------

Not sure if it will help you, but for me moving the site to the root of local http server worked. 

Hi Roman,

Thank you for sharing this... I am having the exact same problem, but this trick wasn't worked for me.. ¿have you discovered the reason behind this behaviour?

Thank you in advance