0

I have a .NET Bot Framework bot created using the template and tested on other channels and in the dashboard.

I've added the Skype for Business channel and performed the PowerShell cmdlets for my tenant. However, I constantly get the reply "Error happened in contacting target user".

I looked in the Bot Framework Dashboard for issues, and the problem is that the Bot Framework is getting back a 401 Unauthorized from my code. Remember that this works fine in other channels.

Suspecting a problem with how Skype for Business passes (or doesn't pass) the authentication tokens I commented out the BotAuthentication decorator. Suddenly everything works fine. So I think there's a problem with the Skype for Business channel and how it passes the authentication credentials, as this situation clearly isn't ideal.

Tom Morgan
  • 2,355
  • 18
  • 29

1 Answers1

0

Just to answer my own question on this. The reason I was seeing this problem was because I did not have the latest version of Microsoft.Bot.Builder. I needed to be running 3.5+ and I wasn't. I've written it up here (along with instructions for updating the NuGet package if you need that): https://blog.thoughtstuff.co.uk/2017/06/how-to-enable-your-bot-framework-bot-on-skype-for-business-part-2-or-how-i-followed-the-instructions-and-it-worked/

Tom Morgan
  • 2,355
  • 18
  • 29
  • I came here searching for whether the Skype for Business passes user's (who is communicating with Bot) authentication token to Bot framework or not. I want to use this token to get the data from my companies internal services on the user's behalf. My companies internal services use the same azure active directory for user authentication as Skype for Business. If this is not possible then is https://github.com/MicrosoftDX/botauth is the only way to authenticate the user? – Gaurav Dhavale Sep 20 '17 at 20:22