问题
I've finally managed to get my bot connected to Skype for Business, however I am having a couple of issues getting it to work.
Firstly the bot doesn't seem to be searchable within Skype, you have to enter the full Uri and it only seems to work with the onmicrosoft.com domain, not our own domain.
Once you open a Skype chat window by using the bot's full Uri and start a conversation, the bot displays as "presence unknown". This may be related to the first issue I guess. Perhaps it's not fully propagated out yet?
Finally once I begin dialog with my bot it does respond asking for an intranet address which is expected. However when you provide the address instead of retrieving the information as it does on all other channels, it asks the same question again and again and then final errors with the following:
Sorry, my bot code is having an issue. Error happened in contacting target user
This error message will display a few times and then it just completely stops responding until you create a new conversation.
I can't see any errors in the bot dashboard like I get on other channels.
回答1:
If it's the same problem as I was having, if you look in the Bot Framework dashboard you'll see issues telling you about Unauthorized errors.
A workaround for now is to remove the [BotAuthentication] decoration from the MessageController method. This is only a temporary fix until this issue gets sorted out - it's clearly not perfect. I've done a full write up here: https://blog.thoughtstuff.co.uk/2017/05/how-to-enable-your-bot-framework-bot-on-skype-for-business-and-how-i-finally-got-it-working/
来源:https://stackoverflow.com/questions/44048053/bot-framework-skype-for-business-channel