Unable to get Bot working with Skype for Business
Bot Info
- SDK Platform: .NET
- SDK Version: Microsoft.Bot.Builder 3.5.9
- Active Channels: Skype for Business, Webchat
- Deployment Environment: Hosted on enterprise server with internet access
Issue Description
Previously Bot worked with Skype for Business. We didn't change code but then it stopped working. We decided to create new Bot Channel Registration and new ADD user for Skype for Business. I noticed now when I run the Poweshell scripts I get errors that I didn't get before.
Right now we have bare bones bot application running built on latest Bot Framework.
Code Example
n/a
Reproduction Steps
Run the powershell scripts as Tenant Admin. Note the error that accompanies New-CsOnlineApplicationEndpoint command, and then on Get-CsOnilneApplicationEndpoint I get warnings about "User is not sip enabled"
New-CsOnlineApplicationEndpoint -ApplicationId 4177cee4-f0ea-4665-84dd-9312f2c77fb4 -Name Bot002 -Uri sip:[email protected] Cmdlet invocation error + CategoryInfo : NotSpecified: (:) [New-CsOnlineApplicationEndpoint], CmdletInvocationException + FullyQualifiedErrorId : Error processing cmdlet request,Microsoft.Rtc.Management.Hosted.PlatformService.NewPlatf ormServiceAppEndpointConfigCmdlet + PSComputerName : admin3a.online.lync.com
Exception of type 'Microsoft.Rtc.Management.Hosted.PlatformService.ProvisioningLibrary.ApplicationEndpointProvisioningException' was thrown. + CategoryInfo : InvalidOperation: (Microsoft.Rtc.M...on' was thrown.:PlatformServiceCmdletException) [Ne w-CsOnlineApplicationEndpoint], ApplicationEndpointProvisioningException + FullyQualifiedErrorId : Exception of type 'Microsoft.Rtc.Management.Hosted.PlatformService.ProvisioningLibrary.A pplicationEndpointProvisioningException' was thrown.,Microsoft.Rtc.Management.Hosted.PlatformService.NewPlatformSe rviceAppEndpointConfigCmdlet + PSComputerName : admin3a.online.lync.com
Get-CsOnlineApplicationEndpoint -Uri sip:[email protected] ApplicationId : 4177cee4-f0ea-4665-84dd-9312f2c77fb4
RunspaceId : 7a60dbc7-ec13-4170-b7c3-4f8bae96dc05 FriendlyName : Bot002 Id : 68c276d6-6eda-4bdf-b0d7-73ae24b8fcab TenantId : e553abae-0eb1-4360-8f13-f25efa818c5c EndpointType : Targeted SipUri : sip:[email protected] PhoneNumber : CallbackUri : Ring : ring2 ClientAudience :
WARNING: Exception encountered when fetching user from AAD. WARNING: User is not sip enabled. WARNING: Please run the following command to fix the application endpoint: Set-CsOnlineApplicationEndpoint -Uri sip:[email protected]
Expected Behavior
Actual Results
n/a see the errors above
Is this a valid sip? [email protected] <-- it looks like you are missing something between @ and .
Sorry, the way my post saved was incorrect. I corrected the original posting. The sip is valid.
Are you using a different sip than you had used before? or are you trying to use the same one?
Also, is your actual bot handle bot002?

My bot handle is different but I do not think this is the issue. I think there is something wrong with new user account I created OR skype. This morning I ran Get-CsOnlineApplicationEndpoint, and it does show bot ApplicationId linked, but then I get warnings (bold).
As per recommendation I run the command Set-CsOnlineApplicationEndpoint, and this takes about 60 seconds to come back with error. Almost like it's timing out reaching somewhere.
I also don't understand the issue with "Exception encountered when fetching user from AAD"
Does the user need to have licenses assigned on admin.office.com in order for this to work? We didn't do this before.
Get-CsOnlineApplicationEndpoint -Uri sip:[email protected] ApplicationId : 4177cee4-f0ea-4665-84dd-9312f2c77fb4
RunspaceId : 46732ff3-69da-4c5d-8a40-7650f2d8b959 FriendlyName : Bot002 Id : 68c276d6-6eda-4bdf-b0d7-73ae24b8fcab TenantId : e553abae-0eb1-4360-8f13-f25efa818c5c EndpointType : Targeted SipUri : sip:[email protected] PhoneNumber : CallbackUri : Ring : ring2 ClientAudience :
WARNING: Exception encountered when fetching user from AAD. WARNING: User is not sip enabled. WARNING: Please run the following command to fix the application endpoint: Set-CsOnlineApplicationEndpoint -Uri sip:[email protected]
Set-CsOnlineApplicationEndpoint -Uri sip:[email protected] WARNING: Exception encountered when fetching user from AAD. WARNING: User is not sip enabled. Cmdlet invocation error + CategoryInfo : NotSpecified: (:) [Set-CsOnlineApplicationEndpoint], CmdletInvocationException + FullyQualifiedErrorId : Error processing cmdlet request,Microsoft.Rtc.Management.Hosted.PlatformService.SetPlatf ormServiceAppEndpointConfigCmdlet + PSComputerName : admin3a.online.lync.com
Exception of type 'Microsoft.Rtc.Management.Hosted.PlatformService.ProvisioningLibrary.ApplicationEndpointProvisioningException' was thrown. + CategoryInfo : NotSpecified: (Microsoft.Rtc.M...on' was thrown.:PlatformServiceCmdletException) [Set-Cs OnlineApplicationEndpoint], ApplicationEndpointProvisioningException + FullyQualifiedErrorId : Exception of type 'Microsoft.Rtc.Management.Hosted.PlatformService.ProvisioningLibrary.A pplicationEndpointProvisioningException' was thrown.,Microsoft.Rtc.Management.Hosted.PlatformService.SetPlatformSe rviceAppEndpointConfigCmdlet + PSComputerName : admin3a.online.lync.com
Any suggestions here?
Hi. I got same issue months ago. When you run New-CsOnlineApplicationEndpoint it creates the users if does not exists. In one case I had an already created user, I tried to use it, and some missconfiguration taked me to not being able to use it as a sip.
My suggestion is to use an sip that is not already an user. Also take into account that delete user is logic and no physic, so removing the user is not enough, you must use an sip that was never used (at least to try if you fix it that way).
Perhaps you can give it a try.
Closing for lack of response from OP.
Hi, I was with that problem for 2 days.
Here what solved my problem:
When you execute the command: New-CsOnlineApplicationEndpoint -ApplicationId {App ID} -Name NameOfTheBot -Uri sip: [email protected] we create a new user, but that does not mean that it is enabled in the network.
It seems that you need to enable in the Office365 administration portal, that the sip: [email protected] is created by default disabled.
You can follow: Office365 -> Applications -> Administration -> users -> active users:
- Search the user: {[email protected]}, click and enable the option: Login status.

With this, I did not have to wait for the 8 hours that the documentation sends.
I hope it helps.