如何将僵尸程序连接到Skype以进行业务

时间:2017-05-17 10:40:55

标签: powershell botframework skype-for-business

我目前正在使用Microsoft Bot Framework,并且正在尝试将我的机器人连接到新的Skype for Business渠道。

我已按照说明操作:

  1. 下载并安装Skype for Business Online Connector模块
  2. 以管理员身份打开Windows PowerShell并运行以下命令:

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

  3. 输入管理员凭据

  4. 运行以下cmdlet:

    New-CsOnlineApplicationEndpoint -ApplicationId botid -Name NameOfTheBot -Uri sip:username @ yourdomain

  5. 我让我们的租户管理员输入他的凭据,并使用Office 365许可证为机器人创建域帐户。 (我首先尝试注册未分配Office 365许可证的bot。)

    当僵尸程序帐户拥有Office 365许可证并尝试调用New-CsOnlineApplicationEndpoint时,我收到以下错误:

    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
    

    如果没有Office 365许可证,我收到以下错误:

    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
    

    我还关注了Skype for Business连接器的一些更通用的信息,详见此处:https://msdn.microsoft.com/en-us/skype/trusted-application-api/docs/trustedapplicationendpoint

    我还尝试使用本期中提到的新帐户,但遇到了同样的错误:Unable to connect bot to Skype For Business Online

1 个答案:

答案 0 :(得分:4)

您需要定位域:

SIP:botname@company.onmicrosoft.com

如果您定位自定义域,它似乎无效。