microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.5k stars 2.44k forks source link

[Skype For Business] Property immutableId is invalid #2916

Closed sureshgururajan closed 7 years ago

sureshgururajan commented 7 years ago

System Information (Required)

Issue Description

We want to configure Skype for Business channel using Bot Framework channel. We followed the instructions in this link and our tenant administrator tried to execute the commands:

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

and

New-CsOnlineApplicationEndpoint -ApplicationID 41ec7d50-ba91-1208-73ee-136b88859725 -Name NameOfTheBot -Uri sip:username@yourdomain.com

The second command fails with the error:

Cmdlet invocation error

    + CategoryInfo          : NotSpecified: (:) [New-CsOnlineApplicationEndpoint], CmdletInvocationException

    + FullyQualifiedErrorId : Error processing cmdlet request,Microsoft.Rtc.Management.Hosted.PlatformService.NewPlatf

   ormServiceAppEndpointConfigCmdlet

    + PSComputerName        : admin0a.online.lync.com

{"odata.error":{"code":"Request_BadRequest","message":{"lang":"en","value":"Property immutableId is invalid."},"date":"

2017-05-26T21:39:56","requestId":"1c8e3396-c2c3-481c-a27e-ce11ec90b68a","values":[{"item":"PropertyName","value":"immut

ableId"},{"item":"PropertyErrorCode","value":"GenericError"}]}}

    + CategoryInfo          : InvalidOperation: (Microsoft.Rtc.M...nericError"}]}}:PlatformServiceCmdletException) [Ne

   w-CsOnlineApplicationEndpoint], DataServiceClientException

    + FullyQualifiedErrorId : {"odata.error":{"code":"Request_BadRequest","message":{"lang":"en","value":"Property imm

   utableId is invalid."},"date":"2017-05-26T21:39:56","requestId":"1c8e3396-c2c3-481c-a27e-ce11ec90b68a","values":[{

  "item":"PropertyName","value":"immutableId"},{"item":"PropertyErrorCode","value":"GenericError"}]}},Microsoft.Rtc.

Management.Hosted.PlatformService.NewPlatformServiceAppEndpointConfigCmdlet

    + PSComputerName        : admin0a.online.lync.com

Code Example

New-CsOnlineApplicationEndpoint -ApplicationID <our app ID obtained from bot framework> -Name NameOfTheBot -Uri sip:username@yourdomain.com

Steps to Reproduce

  1. Use the latest Windows PowerShell (Version 5.0).
  2. Follow the steps given in https://msdn.microsoft.com/en-us/skype/skype-for-business-bot-framework/docs/overview#add-bot

Expected Behavior

Successful execution of the command

Actual Results

Cmdlet invocation error

    + CategoryInfo          : NotSpecified: (:) [New-CsOnlineApplicationEndpoint], CmdletInvocationException

    + FullyQualifiedErrorId : Error processing cmdlet request,Microsoft.Rtc.Management.Hosted.PlatformService.NewPlatf

   ormServiceAppEndpointConfigCmdlet

    + PSComputerName        : admin0a.online.lync.com

{"odata.error":{"code":"Request_BadRequest","message":{"lang":"en","value":"Property immutableId is invalid."},"date":"

2017-05-26T21:39:56","requestId":"1c8e3396-c2c3-481c-a27e-ce11ec90b68a","values":[{"item":"PropertyName","value":"immut

ableId"},{"item":"PropertyErrorCode","value":"GenericError"}]}}

    + CategoryInfo          : InvalidOperation: (Microsoft.Rtc.M...nericError"}]}}:PlatformServiceCmdletException) [Ne

   w-CsOnlineApplicationEndpoint], DataServiceClientException

    + FullyQualifiedErrorId : {"odata.error":{"code":"Request_BadRequest","message":{"lang":"en","value":"Property imm

   utableId is invalid."},"date":"2017-05-26T21:39:56","requestId":"1c8e3396-c2c3-481c-a27e-ce11ec90b68a","values":[{

  "item":"PropertyName","value":"immutableId"},{"item":"PropertyErrorCode","value":"GenericError"}]}},Microsoft.Rtc.

Management.Hosted.PlatformService.NewPlatformServiceAppEndpointConfigCmdlet

    + PSComputerName        : admin0a.online.lync.com

We tried to see if the end point was added using:

PS C:\mypowershell\working-skype> Get-CsOnlineApplicationEndpoint -uri sip:<our user ID@our domain.com>

Output:

ApplicationId : <obtained from bot framework>

RunspaceId     : 1e79bb4d-7f27-4b4e-8a7a-9e9038ea42f4

FriendlyName   : <friendly name>

Id             : <id>

TenantId       : <tenant ID>

EndpointType   : Targeted

SipUri         : <sipURI>

PhoneNumber    :

CallbackUri    :

Ring           : ring2

ClientAudience :

WARNING: Please run the following command to fix the application endpoint:

Set-CsOnlineApplicationEndpoint -Uri sip:<sipuri>

We then executed the command

Set-CsOnlineApplicationEndpoint -Uri sip:<sipuri>

but ended up with the same error as when we tried to add a new endpoint.

chenguyuan commented 7 years ago

Hi Team, I am facing the same problem here, do we have an resolution for this issue?

Thank you! Guyuan

rohantare commented 7 years ago

Hello, I am also facing the same issue. New-CsOnlineApplicationEndpoint -ApplicationId -Name -Uri sip:admin_uname>@<domain.onmicrosoft.com

Do we have update on this?

Regards, Rohan

sureshgururajan commented 7 years ago

There's no update on this for 19 days now.

Kandium commented 7 years ago

I too am now wanting a response on this one... same issue here this afternoon.

rohantare commented 7 years ago

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 commented 7 years ago

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

jp-cf commented 7 years ago

I am also facing this same issue. Tried all in lowercase as suggest above but with no joy. I get the following error:

Cmdlet invocation error
    + CategoryInfo          : NotSpecified: (:) [New-CsOnlineApplicationEndpoi
   nt], CmdletInvocationException
    + FullyQualifiedErrorId : Error processing cmdlet request,Microsoft.Rtc.Ma
   nagement.Hosted.PlatformService.NewPlatformServiceAppEndpointConfigCmdlet
    + PSComputerName        : admin1e.online.lync.com

{"odata.error":{"code":"Request_BadRequest","message":{"lang":"en","value":"Pro
perty immutableId is invalid."},"date":"2017-07-26T10:11:34","requestId":"13b71
50b-2fad-4296-9ca4-a0b5d1c8a2a7","values":[{"item":"PropertyName","value":"immu
tableId"},{"item":"PropertyErrorCode","value":"GenericError"}]}}
    + CategoryInfo          : InvalidOperation: (Microsoft.Rtc.M...nericError"
   }]}}:PlatformServiceCmdletException) [New-CsOnlineApplicationEndpoint], Da
  taServiceClientException
    + FullyQualifiedErrorId : {"odata.error":{"code":"Request_BadRequest","mes
   sage":{"lang":"en","value":"Property immutableId is invalid."},"date":"201
  7-07-26T10:11:34","requestId":"13b7150b-2fad-4296-9ca4-a0b5d1c8a2a7","valu
es":[{"item":"PropertyName","value":"immutableId"},{"item":"PropertyErrorC
ode","value":"GenericError"}]}},Microsoft.Rtc.Management.Hosted.PlatformSe
rvice.NewPlatformServiceAppEndpointConfigCmdlet
    + PSComputerName        : admin1e.online.lync.com

Any feedback around this would be great.

davnewman commented 7 years ago

@sureshgururajan Is the domain in which you are attempting to create a bot a Federated Domain for your tenant? Or is your Skype for Business environment a Hybrid environment? A good validation step to see if this is the issue would be to register a bot using the *.onmicrosoft.com domain of your tenant.

sureshgururajan commented 7 years ago

Yes, that was the issue. We were using a federated domain which had the format *.onmicrosoft.com but we were trying to issue the command with our domain which resulted in this issue.

Once we used the *.onmicrosoft.com domain in the -Uri parameter, the command worked.

Thank you so much :)

SaranrajK commented 6 years ago

Hi, can anyone tell me that whether my bot is successfully deployed or not sfb3