Launched in April 2015, Skype for Business is the business version of the popularly used chat application, Skype. This telecommunications software was once known as Microsoft Lync Server (because it is a combination of Lync and Skype), and uses text chat, voice calls and online meetings to communicate with people.
At the click of a button, you can make voice or video calls, share files, perform web conferencing, send emails, open text chats and start online meetings with people from around the world, provided they have a good internet connection. Skype For Business is Software as a Service offering and comes under Microsoft 365. If you want to configure it as a stand-alone product, that's also possible. It is also called S4B, SFB, SfB or Skype4B in short.
The software can be deployed as on-premise, hybrid or on the cloud. It can run on Android devices, Windows operating systems and Apple iOS devices. The best features for Skype4B include:
- High definition video and audio conferencing for up to 250 people
- Topic based discussion sessions remain intact even after the users leave
- You can schedule meeting via Web Scheduler and Outlook
- Easy broadcast to over 10,000 attendees
- You can record different aspects of the meeting for future
Why Skype for Business is so Trendy in the Market
SFB is very easy to integrate with other apps. With serverless computing you can integrate all the platforms easily, especially integrating email with Dynamics and Skype with email under a single suite.
It also offers the possibility to invite third parties into the meetings, including people who are actually outside the network, even if they don't have an email account. Once the participants are registered in their company's domain, they can join in for meetings within the S4B platform.
With the ban of chat applications in some Middle Eastern countries, business enterprises in other countries were unable to interact with their partners and stakeholders in those countries. They couldn't hold meetings or discussions regarding their business as they would have liked. With Skype4B, this has been solved. Collaboration with partners and stakeholders can be done by inviting third parties. A single account with Microsoft would give them the opportunity to continue their interaction seamlessly and fruitfully.
Skype for Business Requisites
Before we look at the process of integrating Skype for business into an application, certain pre-requisites need to be in place.
1. Office 365 Tenant - It is imperative to have an Office 365 for SFB tenant with a user who has been assigned a Skype for Business license.
You can choose a subscription-based model depending on the number of users you are planning to add. However, it is essential for at least one user to have access to Skype For Business.
2. Azure Active Directory - Set up a tenant in Azure Active Directory, if not already done. Open the Admin Center section of the Office 365 Admin Portal to get to the Azure portal.
3. Web Server - A web server is required to host the app since Skype Web SDK is for a web application. Azure Web Apps is a viable option.
4. Any editor for coding JavaScript and HTML.
Trusted Application API
The Trusted Application API is a Rest API that meets the demand to build powerful, back-end features with Skype for Business Online in the cloud. It is essentially an extensible Skype for Business Online Cloud.
The API makes things easier for the developer, akin to Skype for Business Server's Unified Communications Managed API (UCMA) in the cloud. This API makes it possible to have a cloud-first approach. It also provides, a number of powerful features that are not available on on-premises Skype for Business Server customers through UCMA.
It makes scaling easier, helps reduce operational costs and leads to very low security risks (from untrusted tenants and applications) as communication resources and tenant/domain-specific application data are separated.
The Trusted Application API lets developers write Skype for Business Online applications that act as a service endpoint without requiring a user context or identity. The most common use cases are apps that schedule and manage on-demand meetings (Example: a contact center application), those that create on-demand customer service calls and add customer service reps to the meetings, voice-based call answering services and routing bots.

Image Credit: Microsoft
This diagram clearly shows how the Trusted Application API is placed as the middle-tier SaaS component in Skype For Business Online. A 3rd party service app provides simple RESTful interface between a mobile client and the Trusted Application endpoint.
Example: Service App helper method handles authentication token fetching and discovery services for a mobile client. Trusted Application APIs can be called upon to create new meetings and return meeting join URLs to mobile clients that will join the meetings.
Integration of Skype for Business into Applications

Image Credit: GitHub
Step 1: Register the Application in Microsoft Azure Active Directory
Click on the quick registration tool to register Skype for Business Trusted Applications in Azure and Skype for Business Online. This way, you don't have to register your application separately in Azure portal. You can also set the identification and the permissions it requires.
In case, you'd prefer to do a manual registration in Azure Active Directory, the following steps can be done with Microsoft Office 365 user privileges.
1. Login to Microsoft Azure with your Microsoft Office 365 user ID and password. Microsoft Azure window comes to display.
2. In the Microsoft Azure portal, move to: Azure Active Directory> App Registrations> New Application Registration.
3. Set the application name in the Name field.
4. Set the Application Type to Web app/API. This will be set by default.
5. Specify your application's URL in Sign-on URL.
6. Click Create. Now, the app is registered and displayed in the list of applications in the App Registrations window. Following this, an Application ID is generated.
The required permissions must be enabled in Skype for Business to complete the registration process.
1. Select the application from the App Registrations window.
2. Under the Settings tab, navigate to the API Access section and click Required Permissions.
3. Click Add and Select and API.
4. Choose Skype for Business Online (Microsoft.Lync) API.
5. Click Select Permissions and choose the required permissions
There are essentially two types of permissions you can choose from:
Application Permissions: To access Skype for Business Online on behalf of an application.Delegated Permissions: To access Skype for Business Online through the application as a user.
6. Once the required permissions are selected, click Done.
Step 2: Register the Trusted Application Endpoints
With the help of PowerShell cmdlets, you can register Trusted Endpoints in a Skype for Business Online tenant.
In order to run the admin PowerShell, do the following:
- Download and install the Skype for Business Online Connector module.
- Open Windows PowerShell as Administrator and run the following script.
Import-PSSession (New-CsOnlineSession -Credential (Get-Credential))
Setting up the Trusted Application Endpoints can be done using the following cmdlets.
- New-CsOnlineApplicationEndpoint To create a new application endpoint.
- Get-CsOnlineApplicationEndpoint - To fetch the application endpoints for the tenants.
- Set-CsOnlineApplicationEndpoint To update the application endpoint.
- Remove-CsOnlineApplicationEndpoint To remove the application endpoint.
The cmdlets utilize one or more of the following parameters:
ApplicationId: The Azure ApplicationID/ClientID that was generated during the registration.
Name: A simple name of the application inside Skype for Business Online.
Uri: The unique SIP URI which is used to identify the application's tenant specific endpoint. Requests sent to this endpoint will trigger the Trusted Application API and send an event to the application which indicates that a request has been sent.
Example: A PowerShell cmdlet to create a new application endpoint
New-CsOnlineApplicationEndpoint -Uri "sip:identifier@sample.com" -ApplicationId "12cc763a-5c1f-60da-59fb-g34cj6785354" -Name "DemoApp" -PhoneNumber "18822229898"
Step 3: Provide Consent
If an application is developed as a multi-tenant application, the tenant's admin should consent to it. This ensures that the tenant can use the application.
In order to provide the tenant admin's consent to the application, a consent link can be created. This consent link should have the Client ID and Redirect URI of the application set correctly.
Example:
https://login.windows.net/comm... triggers a page to open up when a tenant admin logs in. The page lists the permission requests from the service application and once it's provided, the application can get Oauth tokens from Azure Active Directory for that particular tenant.
The consent to a particular application can also be revoked by the tenant admin through the AAD Azure Management Portal, or by using the "Remove-MSOLServicePrincipal" cmdlet in Azure AD PowerShell.
Step 4: Authenticate to Obtain Oauth Token
Todos los puntos de conexión de la API de aplicación de confianza requieren un token Oauth con la identidad de la aplicación de Azure AD. Esto permite que la aplicación acceda al recurso de la API de aplicación de confianza.
Dado que la API de aplicación de confianza solo acepta un token Oauth de AAD emitido a una identidad de aplicación, las credenciales de la aplicación (certificado) deben cargarse en Azure Active Directory. Otra alternativa es utilizar un secreto de cliente.
Cuando el servicio de Skype for Business Online solicite autenticación, la aplicación debe autenticarse con Azure Active Directory y recibir el token Oauth.
En esencia, cuando un usuario visita su sitio web e inicia sesión, su aplicación realiza una solicitud al punto de conexión de inicio de sesión común de Microsoft OAuth2. Azure AD responde con una página de inicio de sesión, donde el usuario inicia sesión. Después de verificar la autenticación y autorización de la solicitud, se le concederá acceso al usuario a SFB Online.
Si desea un token de acceso para las solicitudes de la API de Skype for Business, la aplicación debe usar el flujo de concesión implícita de OAuth. Esto no sucederá de forma predeterminada. Actualice el manifiesto de la aplicación para permitir el flujo de concesión implícita de OAuth y luego edite el manifiesto.
Estos son los pasos:
1. En la ventana de Registros de aplicaciones de Azure, haga clic en la aplicación.
2. Haga clic en Manifiesto.
3. En el editor de texto Editar manifiesto, establezca "oauth2AllowImplicitFlow" en "true". Nota: Por defecto, este valor está establecido en Falso.
4. Haga clic en Guardar.
5. Si desea compatibilidad con múltiples dominios, establezca "availableToOtherTenants" en "true".
Paso 5: Llamar a la API de aplicación de confianza
Existen dos categorías de escenarios de aplicación de confianza.
1. La aplicación de servicio inicia el escenario: La aplicación envía solicitudes al Servicio de plataforma de Skype for Business a través de la API de aplicación de confianza para solicitar una capacidad específica (Ejemplo: enviar un mensaje directo)
2. Los eventos de Skype for Business Online inician el escenario: El Servicio de plataforma de Skype for Business envía un evento a la aplicación de servicio (Ejemplo: un mensaje directo entrante). Este evento indica que Skype for Business recibió una solicitud dirigida al punto de conexión de la aplicación de servicio.
Según el escenario requerido, el desarrollador tendrá que actualizar el código para que sea compatible con Skype for Business Online. Para ello, puede actualizar una página web en la aplicación para mostrar la pantalla de inicio de sesión de Azure. También tendrá que realizar cambios en JavaScript para activar el punto de entrada de la API de Skype Web SDK.
Como siguiente paso, llame al método signInManager.signIn en el SDK (ya sea al hacer clic en un botón o automáticamente).
Paso 6: Pruébelo para ver cómo funciona
Para comprobar si su Skype for Business funciona correctamente, necesita dos ordenadores/dispositivos completos con capacidades de audio y video y 2 cuentas de usuario de O365.
Para empezar con el desarrollo de Skype Web SDK, puede utilizar el código de ejemplo simple para Skype for Business Online disponible en GitHub. aquí. A continuación,
1. Acceda a la aplicación web.
2. Haga clic en el botón [Admin Consent] para conceder permisos a su aplicación.
3. Haga clic en el botón [Sign-in O365] para iniciar sesión con su cuenta de O365.
4. Haga clic en el botón [Initialize SkypeUI] para "Initialize Skype Web SDK".
5. Haga clic en el botón [Sign-in Skype] para iniciar sesión en Skype.
6. Haga clic en el botón [Start Chat] para mostrar la ventana de Chat/Audio/Video usando Conversation Control.
7. Ahora, para empezar a chatear, puede iniciar la llamada con el segundo PC. Cuando llame a otro usuario, el navegador mostrará un cuadro de diálogo para activar su micrófono/cámara. Por favor, actívelos.
Conclusión
La integración de Skype Empresarial en las aplicaciones no tendrá ningún coste adicional si su empresa tiene licencia para Skype Empresarial Server o Skype Empresarial Online. Asegúrese de que el navegador sea compatible con WebRTC para garantizar que Skype Web SDK funcione sin problemas.
Todo gran equipo trabaja a través de un proceso de comunicación oportuno, rápido y preciso. Skype Empresarial lo hace posible entre equipos distribuidos geográficamente. Cada paso detallado anteriormente le garantizará el éxito al usar la aplicación Skype Empresarial Online. Asegúrese de cumplir con los requisitos previos antes de iniciar el proceso.
¿Busca integrar Skype Empresarial en su aplicación? ¡Permítanos ayudarle!


