I am currently working with the Microsoft Bot Framework and am trying to connect my bot to the new Skype for business channel.
I've followed the instructions:
- Download and install the Skype for Business Online Connector module
- Open Windows PowerShell as Administrator and run the following: - Import-PSSession (New-CsOnlineSession -Credential (Get-Credential)) 
- Enter your Admin credentials 
- Run the following cmdlet: - New-CsOnlineApplicationEndpoint -ApplicationId botid -Name NameOfTheBot -Uri sip:username@yourdomain 
I got our tenant admin to enter his credentials and also to create a domain account for the bot with an Office 365 licence. (I tried first to register bot without an Office 365 licence assigned).
When the bot account had an office 365 licence and tried to call the New-CsOnlineApplicationEndpoint I got the following error:
Cmdlet invocation error
    + CategoryInfo          : NotSpecified: (:) [New-CsOnlineApplicationEndpoint], CmdletInvocationException
    + FullyQualifiedErrorId : Error processing cmdlet request,Microsoft.Rtc.Management.Hosted.PlatformService.NewPlatformServiceAppEndpointConfigCmdlet
    + PSComputerName        : admin1e.online.lync.com
Could not find the application endpoint
    + CategoryInfo          : InvalidOperation: (Microsoft.Rtc.M...cation endpoint:PlatformServiceCmdletException) [New-CsOnlineApplicationEndpoint], PlatformServiceException
    + FullyQualifiedErrorId : Could not get application endpoint or the Uri is already present as an User in BVD,Microsoft.Rtc.Management.Hosted.PlatformService.NewPlatformServiceAppEndpointConfigCmdlet
    + PSComputerName        : admin1e.online.lync.com
Without the Office 365 licence I got the following error:
Cmdlet invocation error
    + CategoryInfo          : NotSpecified: (:) [New-CsOnlineApplicationEndpoint], CmdletInvocationException
    + FullyQualifiedErrorId : Error processing cmdlet request,Microsoft.Rtc.Management.Hosted.PlatformService.NewPlatformServiceAppEndpointConfigCmdlet
    + PSComputerName        : admin1e.online.lync.com
Exception of type 'Microsoft.Rtc.Management.Hosted.PlatformService.ProvisioningLibrary.ApplicationEndpointProvisioningException' was thrown.
    + CategoryInfo          : InvalidOperation: (Microsoft.Rtc.M...on' was thrown.:PlatformServiceCmdletException) [New-CsOnlineApplicationEndpoint], ApplicationEndpointProvisioningException
    + FullyQualifiedErrorId : Exception of type 'Microsoft.Rtc.Management.Hosted.PlatformService.ProvisioningLibrary.ApplicationEndpointProvisioningException' was thrown.,Microsoft.Rtc.Management.Hosted.PlatformService.NewPlatformServiceAppEndpointConfigCmdlet
    + PSComputerName        : admin1e.online.lync.com
I've also followed some of the more generic info around the Skype for Business connector as detailed here: https://msdn.microsoft.com/en-us/skype/trusted-application-api/docs/trustedapplicationendpoint
I've also tried to use a new account as mentioned in this issue but got the same error: Unable to connect bot to Skype For Business Online