This sample is made for developers who want to start Skype Web SDK development.
Skype Web SDK sample for Skype for Business Online
This document is made for developers who want to start Skype Web SDK development! After you read it and try tutorials, you can sign-in, chat, audio/video communication with Skype Web SDK in the browser like the image below.
- What is Skype Web SDK?
- Preparering for development
- How to deploy and try sample in your environment
- Next Step
What is Skype Web SDK?
Preparering for development
For developing application with Skype Web SDK, you need to prepare these resources below.
- Office 365 tenant. It inclues Skype for Business.
- Azure Active Directory
- Web Server
The combination flow of these resources is below.
1.Office 365 tenant
Skype for Business environment is included in Office 365(O365) tenant, so you need to prepare O365 tenant. Please refer this document to setup your O365 tenant. After you get O365 tenant please add some test users for testing.
For your information
Microsoft offers "Office 365 Dev Program" to get free O365 tenant. You can get a free O365 tenant from here and get a free Office 365 tenant, but it includes only one user subscription, so it is difficult for Skype testing.
2.Azure Active Directory
Skype Web SDK use OAuth for authentication and authorization, and it is handled by Azure Active Directory (Azure AD). If you are new for Azure, you can sign-up free trial account from this site.
Because Skype Web SDK is for web application, you need web server to host the app. If you need new Web Server, it is nice choice to try Azure Web Apps.
You can choose any editor or IDEs to develop with Skype Web SDK. If you want to get new one, let's try Visual Studio code! Please download and install it from the web site.
How to deploy and try sample in your environment
The Office 365 services use Azure Active Directory (Azure AD) to provide secure authentication to users' Office 365 data. To access the Skype for Business, you need to register your app with Azure AD.
- Associate your O365 account with Azure AD
- Register your app in Azure Active Directory to use Skype for Business.
- Update config.js
- Deploy to your web server
- Allow to access for Skype for Business by tenant Administrator.
- Try it
1. Associate your O365 account with Azure AD
Before register your app with Azure AD, you need to associate your O365 account with Azure AD. Please read this document and set up it.
2. Register your app in Azure Active Directory to use Skype for Business.
Let's register your app in Azure AD and set permission to access Skype for Business. Please read and follow "Registering your application in Azure AD" and "Configure your app for OAuth implicit grant flow" in this site. In the Azure AD, you should set REPLY URL.Please set "https://sample.com" if you have sample.com domain.
For your information
You can also refer this document.It includes some screen cliping, so you can easily understand how to register your app.
3. Update config.js
When you register your app in Azure AD, you set or got the value of properties below.
- CLIENT ID
- REPLY URL
Please copy the each value and paste them in config.js.
4. Deploy to your web server
5. Allow to access for Skype for Business by tenant Administrator.
Azure AD offer Consent Flow for authentication and authorization. These are the images of consent flow.
Azure AD offer two type of conset.
- User Consent : Each users can see consent and grant by themselves.
- Administrator Consent : Only Administrator can see conset and grant by him/her. It is somtime used for registering ISV's Application.
Skype Web SDK uses Administrator Consent. You should access Administrator consent flow as O365 tenant Administrator and accept permissions. This sample code has [Admin Consent]button, so Please click [Admin Consne]button.
- If you want to know "Consent Flow" more, please read this article.
- This document describe the code for Skype Web SDK Administrator consent.
6. Try it
I recommend to prepare 2 PCs having audio/video device and 2 O365 user accounts for testing.Please follow steps below in each PC.
- Access your web App.
- (If it is first time) Click [Admin Consent]button to grant your app.
- Click [Sign-in O365]button to sign-in with your O365 account.
- Click [Initialize SkypeUI]button to Initialize Skype Web SDK.
- Click [Sign-in Skype]button to sign-in Skype.
- Click [Start Chat]button to show Chat/Audio/Video window using Conversation Control.
- Let's chat, call with your another PC. When you call to other user, the brower will show the dialog to trun on your mic/camera. Please check and turn on.
For your information:
- You may need installing plugin for enable audio/video (learn more).
- You can check supported browsers and capabilities in here.
- I recommend to test with Microsoft Edge. It can use full capabilities of Skype Web SDK now.
In order to understand how to develop, please read the codes and comments in the sample. Enjoy your development with Skype Web SDK!
- To learn how to develop with Skype Web SDK, you can refer more rich sample in GitHub.
- If you are mobile developer, you can develop with Skype for Businee App SDK.
- If you want to know SDK deeply, you can refer this document.
You will need to sign a Contributor License Agreement before submitting your pull request. To complete the Contributor License Agreement (CLA), you will need to submit a request via the form and then electronically sign the Contributor License Agreement when you receive the email containing the link to the document. This needs to only be done once for any Microsoft OSS project.
You can check general contributing way in CONTRIBUTIONG.md.
Copyright (c) 2016 Microsoft Corporation. All rights reserved.