[O365] Adding your chatbot to Skype for Business

Have you been coding your chat bot using the Microsoft Bot Framework? Good news! One of the long awaited features is finally here: the Skype for Business channel! Using this channel, you can now get your but to communicate with users using Skype for Business. This is especially good news for enterprises where S4B is often the primary communication tool. Bots were already available through Microsoft Teams, but not all companies are ready for that yet. Skype was in there as well, but is mostly used on the consumer side. So great to have Skype for Business joining the club!

How to enable the Skype for Business channel

Enabling a bot for a new channel is usually pretty simple. The Skype for Business channel though requires a bit more work.

Note: in order to perform this step you need to be an admin of your Skype for Business instance.

Here’s what you need to do:

  • Go to https://www.botframework.com, log in and click on the bot you want enabled.
  • Add the Skype for Business channel to your bot. 
    skype4b
  • When the channel has been added, the page will display:

    Your bot is enabled for the Skype for Business Channel.

    Want to add your bot to Skype for Business tenant?

    underneath is a link that says Learn how. The link could’ve better been a button if you ask me, there’s not much emphasis now even though the instructions on that page are critical to get it working.

  • The page will list some commands you need to run in a Powershell window. First, Download and install the Skype for Business Online Connector module and then run:
    Import-PSSession (New-CsOnlineSession -Credential (Get-Credential))

     

  • This will enter you into a session connected to the remote Skype for Business cmdlets. Now you need to register your bot:
    New-CsOnlineApplicationEndpoint -ApplicationId 110e87ba-9f5e-407e-a199-037e0f05bb35 -Name NameOfTheBot -Uri sip:username@yourdomain.com

     

There’s a little catch here. The example says username@yourdomain.com. Actually this should’ve said: username@tenant.onmicrosoft.com. Adding a user using a custom domain as the sample shows does not work, at least not at this time. You’ll get a pretty non-descriptive error saying “Cmdlet invocation error” and “Could not find the application endpoint” if you try to do it this way. So make sure you pick a user from your tenant and that you use the tenant.onmicrosoft.com domain to identify it.

Now your bot will, after a wait (which can take up to 8 hours), appear in Skype for Business and users can interact with it. There are numerous possibilities for this. For instance, our bot helps us with tasks like requesting leave, booking hours and remind me to book my hours when I once again forgot to 😉

 

Update: after waiting for a while, you might be able to find your bot in the Skype directory, but interacting with it doesn’t work. This problem is being looked into, as soon as I know a way to resolve it I’ll update this blog post accordingly.

Update 05/29: after waiting some more I decided to delete the endpoint and retry creating it. And sure enough, my bot is now responding! Problem solved, it seems.

 

Jennifer

, ,

Related posts

Long Term Support… or not?

Have you been coding your chat bot using the Microsoft Bot Framework? Good news! One of the long awaited features is finally here: the Skype for Business channel! Using this channel, you can now get your but to communicate with users using Skype for Business. This is especially good news for enterprises where S4B is often the primary communication tool. Bots were already available through Microsoft Teams, but not all companies are ready for that yet. Skype was in there as well, but is mostly used on the consumer side. So great to have Skype for Business joining the club!

[DevOps] Should you migrate onto YAML release pipelines?

Have you been coding your chat bot using the Microsoft Bot Framework? Good news! One of the long awaited features is finally here: the Skype for Business channel! Using this channel, you can now get your but to communicate with users using Skype for Business. This is especially good news for enterprises where S4B is often the primary communication tool. Bots were already available through Microsoft Teams, but not all companies are ready for that yet. Skype was in there as well, but is mostly used on the consumer side. So great to have Skype for Business joining the club!

Latest posts

Long Term Support… or not?

Have you been coding your chat bot using the Microsoft Bot Framework? Good news! One of the long awaited features is finally here: the Skype for Business channel! Using this channel, you can now get your but to communicate with users using Skype for Business. This is especially good news for enterprises where S4B is often the primary communication tool. Bots were already available through Microsoft Teams, but not all companies are ready for that yet. Skype was in there as well, but is mostly used on the consumer side. So great to have Skype for Business joining the club!

[DevOps] Should you migrate onto YAML release pipelines?

Have you been coding your chat bot using the Microsoft Bot Framework? Good news! One of the long awaited features is finally here: the Skype for Business channel! Using this channel, you can now get your but to communicate with users using Skype for Business. This is especially good news for enterprises where S4B is often the primary communication tool. Bots were already available through Microsoft Teams, but not all companies are ready for that yet. Skype was in there as well, but is mostly used on the consumer side. So great to have Skype for Business joining the club!

8 comments

  • Hi Jasper. After the May SfB CU, you can use the username@yourdomain.com
    But I’m still not able to see it in the SfB client. I also had to run a command to create the user my on-premises domain.
    Do you know if I missing anything else?

    • Hi Hubo,

      Unfortunately I have no solution yet. I’m using using the on-prem version but an Office365 instance, it’s not working there either. When I find out what is wrong, I’ll update this post accordingly.

  • Adrian Di Ruggiero

    Hello, I’m sorry to bother you, but since I’m trying to create a BOT to be used with SFB, I’d like to know something: Is there posible to know the name (user name, or display name) from the person the BOT is chatting with?
    The BOT will perform some tasks on behalf of the user, and I don’t know to add an extra step to the BOT asking to the user “who are you?”, or performing some extra authentication methods.
    Thank you in advance

  • Hello, I know it’s a very basic question. but I just need to know.
    I created a bot, working on all other channels, then I registered with skype for business.
    I created a new user for skype for business in my tenant then perform the steps described in Bot framework, all commands ran successfully, I can search the bot skype for business but it shows offline and doesn’t respond. I am waiting for a couple of days.

    Do I need to create a user for skype for business before running the commands?

    • Hi Sunil!

      Questions are never basic or dumb, glad you posted! It’s hard to judge with little information. I would guess that you need to create the user before you register the channel, yes. Best way is to just find out. Anyways, if it has been days and there’s still no action, safe to assume that something did not turn out right and you’ll need to retry the procedure.

  • Hi jasper,

    We are in the process of creating a BOT for S4B and we would like to know is there any way we can out BOT to users contacts or display our BOT on the Top for someone to use it easily and also kindly help us with the information on how we make our BOT appear on top of the list whenever users try to search for a BOT of my BOT category.

    Thanks in advance for your help.

    Regards,
    Krishna

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *