botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

[Skype for Business] Unable to configure Channel in MS BOT

Open PrasenjitSaha opened this issue 9 years ago • 18 comments

Hi All, I have followed whatever steps are mentioned to configure Skype for business channel. While running below Power Shell Command -

New-CsOnlineApplicationEndpoint -ApplicationId -Name -Uri sip:[email protected]

I am getting below error -

Cmdlet invocation error + CategoryInfo : NotSpecified: (:) [New-CsOnlineApplicationEndpoint], CmdletInvocationException + FullyQualifiedErrorId : Error processing cmdlet request,Microsoft.Rtc.Management.Hosted.PlatformService.NewPlatf ormServiceAppEndpointConfigCmdlet + PSComputerName : adminin1.online.lync.com

Could not find the application endpoint + CategoryInfo : InvalidOperation: (Microsoft.Rtc.M...cation endpoint:PlatformServiceCmdletException) [Ne w-CsOnlineApplicationEndpoint], PlatformServiceException + FullyQualifiedErrorId : Could not get application endpoint or the Uri is already present as an User in BVD,Micro soft.Rtc.Management.Hosted.PlatformService.NewPlatformServiceAppEndpointConfigCmdlet + PSComputerName : adminin1.online.lync.com

I am using tanent admin. I have downloaded Downloaded and installed the Skype for Business Online Connector module. Able to connect using online credential using below credential -

Import-PSSession (New-CsOnlineSession -Credential (Get-Credential))

Can anybody tell me why is this happening?

PrasenjitSaha avatar May 26 '17 12:05 PrasenjitSaha

I have successfully configured one MS BOT in Skype for business channel after trying many times but in chat window now I am getting error from O365 Skype for Business "Error happened in contacting target user". I have tried to commenting [BotAuthentication] attribute but not working...

PrasenjitSaha avatar May 29 '17 09:05 PrasenjitSaha

Similar to #2808

jsiegmund avatar May 29 '17 18:05 jsiegmund

@PrasenjitSaha I saw that issue but it went away after 24 hours - I think it takes that long for all the connections to propagate through the Skype for Business system

synesthesia avatar Jun 07 '17 08:06 synesthesia

@PrasenjitSaha How did you get rid of the error? I'm having the exact same issue.

djcurtis2 avatar Jun 23 '17 15:06 djcurtis2

@PrasenjitSaha , I am getting the same error as you mentioned in the first post of this thread. How did you get rid of this error?

Please help!

Regards, Rohan

rohantare avatar Jun 28 '17 20:06 rohantare

@PrasenjitSaha I contacted Microsoft and they told me the error is due to the fact that the product is still in "Preview". Not really much help :(

djcurtis2 avatar Jun 28 '17 21:06 djcurtis2

I got a breakthrough. The issue was in sipuri.

Detailed link: 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/

Tip worked for me:

The -Name is the display name shown in the Skype for Business client. The -Uri can be any unused SIP address, and the domain can be any domain you have set up in your tenant, but nothing else (you can’t just choose a @microsoft.com domain for instance!). Also, don’t use capitals or mixed case – it has to be all lower case otherwise you’ll get an error.

rohantare avatar Jun 29 '17 21:06 rohantare

Now when I send message to the bot on SFB, I get the error we couldnt reach the bot, I hope this works after 24 hrs, like post says

rohantare avatar Jun 29 '17 21:06 rohantare

Now I am able to configure any SFB Bot. Keeping in mind two things -

  1. New-CsOnlineApplicationEndpoint -ApplicationId -Name -Uri sip:[email protected] in the command sip should be in lower case.

  2. After successful addition of bot user(sip) during conversation if you get "Error happened in contacting target user". Wait for 24 hours. it will provide you response.

PrasenjitSaha avatar Jun 30 '17 11:06 PrasenjitSaha

I am getting "We couldn't reach @.onmicrosoft.com to send this message." Did you get this one? I am using free trial version of office 365 tenant, where this user has been created successfully. Now waiting for 24 hrs to get over. Did @PrasenjitSaha , you encountered this error message. during 24hrs?

rohantare avatar Jun 30 '17 11:06 rohantare

No @rohantare.

  1. But please make sure you are using Bot Builder 3.5+ to create the bot.
  2. Check in all sfb client web / desktop whether you are getting same error.

One of my colleague got that error but he was able to receive the response from bot after 1 hr of addition of bot. You can try to delete old bot users and again try to create it.

PrasenjitSaha avatar Jun 30 '17 11:06 PrasenjitSaha

Hey @PrasenjitSaha ,

Thank you so much for your reply. I re-installed skype for business online, and tried to contact my bot.

I am able to get replies from bot only if I login with another account in the same tenant. Like I wrote before, i created test tenant, which has 2 users. One is bot and one is another user.

Issue 1. Does your bot works cross domain?

Issue 2: I also noticed that bot can't display enums from FORM builder and adaptive cards, which works fine on Skype and webchat channel but not on SFB.

Any comments on above 2 issues?

rohantare avatar Jul 03 '17 11:07 rohantare

Right now Adaptive Card is not supported in SFB. Follow https://github.com/Microsoft/BotBuilder/issues/2801 Also rich card is not supported https://github.com/Microsoft/BotBuilder/issues/3065#issuecomment-312281937

PrasenjitSaha avatar Jul 03 '17 11:07 PrasenjitSaha

@PrasenjitSaha Thank you for the quick reply. Any comment on cross-domain stuff? is your bot responding to users, which are not in the tenant?

rohantare avatar Jul 03 '17 12:07 rohantare

Mine is working on single tenant. Not sure about cross-domain

PrasenjitSaha avatar Jul 03 '17 12:07 PrasenjitSaha

Closing this thread as I have solved my self

PrasenjitSaha avatar Jul 03 '17 12:07 PrasenjitSaha

do you know how to remove or rename a bot? (got a "new" version of our bot ;-)

ERROR on: "New-CsOnlineApplicationEndpoint" NotFound + CategoryInfo : InvalidOperation: (Microsoft.Rtc.M...ption:NotFound:PlatformServiceCmdletException) [New-CsOnlineApplicationEndpoint], DataServiceClientException + FullyQualifiedErrorId : Could not get application endpoint or the Uri is already present as an User in BVD,Microsoft.Rtc.Management.Hosted.PlatformService.NewPlatformServiceAppEndpointConfigCmdlet + PSComputerName : admin0e.online.lync.com

josy1024 avatar May 09 '18 16:05 josy1024

@josy1024 Have you tried using Remove-CsOnlineApplicationEndpoint ? "It is used to remove the application endpoint." Described here: https://msdn.microsoft.com/en-us/skype/trusted-application-api/docs/trustedapplicationendpoint

EricDahlvang avatar May 09 '18 20:05 EricDahlvang