Skype for Business online WebSDK sign in

%3CLINGO-SUB%20id%3D%22lingo-sub-39385%22%20slang%3D%22en-US%22%3ESkype%20for%20Business%20online%20WebSDK%20sign%20in%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-39385%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20use%20Skype%20for%20Business%20online%20WebSDK.%20I'm%20following%20the%20instructions%20located%20here%20-%20%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2FSkype%2FWebSDK%2Fdocs%2FDevelopWebSDKappsForSfBOnline%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmsdn.microsoft.com%2FSkype%2FWebSDK%2Fdocs%2FDevelopWebSDKappsForSfBOnline%3C%2FA%3E.%3CBR%20%2F%3EI'm%20trying%20to%20authenticate%20user%20with%20Office%2065%20online%20but%20I%20have%20problems%20while%20executing%20app.signInManager.signIn%20command.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EBrowser%20sends%20several%20requests%3A%3C%2FP%3E%3CP%3E1.%20Request%20URL%3A%3CA%20href%3D%22https%3A%2F%2Fwebdir.online.lync.com%2Fautodiscover%2Fautodiscoverservice.svc%2Froot%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwebdir.online.lync.com%2Fautodiscover%2Fautodiscoverservice.svc%2Froot%3C%2FA%3E%3CBR%20%2F%3ERequest%20Method%3AGET%3CBR%20%2F%3EStatus%20Code%3A200%20OK%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2.%20Request%20URL%3A%3CA%20href%3D%22https%3A%2F%2Fwebdir2e.online.lync.com%2FAutodiscover%2FAutodiscoverService.svc%2Froot%2Foauth%2Fuser%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwebdir2e.online.lync.com%2FAutodiscover%2FAutodiscoverService.svc%2Froot%2Foauth%2Fuser%3C%2FA%3E%3CBR%20%2F%3ERequest%20Method%3AOPTIONS%3CBR%20%2F%3EStatus%20Code%3A200%20OK%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E3.%20Request%20URL%3A%3CA%20href%3D%22https%3A%2F%2Fwebdir2e.online.lync.com%2FAutodiscover%2FAutodiscoverService.svc%2Froot%2Foauth%2Fuser%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwebdir2e.online.lync.com%2FAutodiscover%2FAutodiscoverService.svc%2Froot%2Foauth%2Fuser%3C%2FA%3E%3CBR%20%2F%3ERequest%20Method%3AGET%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EStatus%20Code%3A401%20Unauthorized%3C%2FP%3E%3CP%3EThe%20last%20request%20is%20failing%20with%20an%20error%3A%3CBR%20%2F%3E401%20-%20Unauthorized%3A%20Access%20is%20denied%20due%20to%20invalid%20credentials.%3CBR%20%2F%3EYou%20do%20not%20have%20permission%20to%20view%20this%20directory%20or%20page%20using%20the%20credentials%20that%20you%20supplied.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20authenticating%20with%20admin%20user%20and%20with%20an%20account%20that%20has%20Skype%20for%20Business%20online%20subscription.%3C%2FP%3E%3CP%3ECan%20you%20help%20me%20with%20this%20problem%3F%20What%20am%20I%20doing%20wrong%3F%20Are%20there%20any%20other%20prerequisites%20to%20be%20able%20to%20successfully%20log%20in%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-39385%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EHow-to%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-131047%22%20slang%3D%22en-US%22%3ERe%3A%20Skype%20for%20Business%20online%20WebSDK%20sign%20in%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-131047%22%20slang%3D%22en-US%22%3EHi%20Roman%2C%20%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20for%20sharing%20this...%20I%20am%20having%20the%20exact%20same%20problem%2C%20but%20this%20trick%20wasn't%20worked%20for%20me..%20%C2%BFhave%20you%20discovered%20the%20reason%20behind%20this%20behaviour%3F%20%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20in%20advance%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-90442%22%20slang%3D%22en-US%22%3ERe%3A%20Skype%20for%20Business%20online%20WebSDK%20sign%20in%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-90442%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Sam%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20solved%20the%20problem.%20I%20described%20it%20here%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fstackoverflow.com%2Fquestions%2F41667130%2Fskype-for-business-online-websdk-sign-in%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F41667130%2Fskype-for-business-online-websdk-sign-in%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20I%20can%20copy%20answer%20here%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20did%20everything%20from%20scratch%20following%20the%20guide%20here%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FOfficeDev%2Fskype-web-sdk-simple-sample-for-SfB-online%22%20rel%3D%22noreferrer%20noopener%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fgithub.com%2FOfficeDev%2Fskype-web-sdk-simple-sample-for-SfB-online%3C%2FA%3E%3CSPAN%3E.%20Created%20a%20Microsoft%20account%2C%20got%20a%20free%20O365%20tenant%2C%20signed%20up%20for%20free%20Azure%20Active%20Directory%20trial%20account.%20Associated%20my%20O365%20account%20with%20Azure%20AD%20as%20described%20here%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Foffice%2Foffice365%2Fhowto%2Fsetup-development-environment%23associate-your-office-365-account-with-azure-ad-to-create-and-manage-apps%22%20rel%3D%22noreferrer%20noopener%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Foffice%2Foffice365%2Fhowto%2Fsetup-development-environment%23associate-your-office-365-account-with-azure-ad-to-create-and-manage-apps%3C%2FA%3E%3CSPAN%3E.%20Then%20I%20registered%20the%20new%20app%20in%20Azure%20Active%20Directory%20to%20use%20Skype%20for%20Business.%20Then%20I%20updated%20config.js%20in%20the%20skype%20web%20sdk%20simple%20sample%20for%20SfB%20online%20application.%20And%20again%20no%20luck%2C%20the%20same%20error%20-%20401%20-%20Unauthorized%3A%20Access%20is%20denied%20due%20to%20invalid%20credentials%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20was%20trying%20to%20run%20the%20index.html%20page%20on%20the%20localhost%20in%20the%20htdocs%2Fskype%20directory.%20Of%20course%20I%20was%20setting%20the%20reply%20url%20accordinly%20as%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Flocalhost%2Fskype%2Findex.html%22%20rel%3D%22nofollow%20noreferrer%20noopener%22%20target%3D%22_blank%22%3Ehttp%3A%2F%2Flocalhost%2Fskype%2Findex.html%3C%2FA%3E.%20Then%20I%20tried%20to%20move%20everything%20in%20skype%20directory%20to%20the%20root%20-%20to%20the%20htdocs%20folder.%20And%20also%20changed%20reply%20url%20to%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Flocalhost%2Findex.html%22%20rel%3D%22nofollow%20noreferrer%20noopener%22%20target%3D%22_blank%22%3Ehttp%3A%2F%2Flocalhost%2Findex.html%3C%2FA%3E.%20And%20very%20strangly%20but%20it%20helped.%20Now%20I%20can%20successfully%20login%20using%20Skype%20WebSDK.%20I%20don't%20know%20the%20reason%20for%20why%20it%20is%20working%20only%20this%20way.%20If%20someone%20have%20an%20idea%20you%20are%20welcome%20to%20comment%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E---------------------%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ENot%20sure%20if%20it%20will%20help%20you%2C%20but%20for%20me%20moving%20the%20site%20to%20the%20root%20of%20local%20http%20server%20worked.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-90434%22%20slang%3D%22en-US%22%3ERe%3A%20Skype%20for%20Business%20online%20WebSDK%20sign%20in%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-90434%22%20slang%3D%22en-US%22%3EHey%20Roman%2C%3CBR%20%2F%3E%3CBR%20%2F%3EDid%20you%20get%20anywhere%20with%20this%3F%20Having%20the%20same%20problem.%3CBR%20%2F%3E%3CBR%20%2F%3ECheers%3CBR%20%2F%3ESam%3C%2FLINGO-BODY%3E
New 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