Calling resources on Trusted Application API for Skype Business Online shows CallbackUriUnreachable

Copper Contributor

I am tasked with implementing a bot connector for Skype for Business Online, and to say it has been challenging is an understatement.  I realize that the Trusted Application API is very new, and just for fun, I also work in a PHP shop, so I'm really not doing myself any favors.  However the beauty of a REST api is supposedly that the language I choose to implement in doesn't matter.

 

In any case, I have jumped through the many hoops of Azure AD authentication and have gotten a reliable process built for getting a token and retrieving the top-level resource urls.  But, when I call these resources (which should be the last step before seeing "hello" in my skype client) I am stymied by an error. 

 

I am calling my "startMessaging" resource, as defined by the communication group on the main Application resource request.  Example call going to https://api.skypeforbusiness.com/platformservice/v1/applications/3168576520/communication/messagingI... sends this data in the body:

 

{
"to":"sip:awaschick@equityim.onmicrosoft.com",
"operationId":"1",
"callbackUrl": "https://janedev8001.ngrok.io/event"
}

In response, I get:

{
  "code": "BadRequest",
  "subcode": "CallbackUriUnreachable",
  "message": "Exception of type 'PlatformService.Web.ValidationException' was thrown.",
  "debugInfo": {
    "errorReportId": "7ade7fb108cd4d28b5ecfebafe6e86bc"
  }
}

The thing is, on my dev proxy, it never registers an incoming request at my specified callback URL.  It's there, I can hit it myself, so everybody else should be as well.  

 

When I configured my Skype endpoint as instructed by the trusted api documentation, in Powershell, though, I get back this information:

 

RunspaceId     : e62a1040-160f-4d5f-a186-d114b76992e2 
FriendlyName   : jane-dev 
Id             : 458ff1f0-53b3-495b-b0ce-47d1cbad5849 
TenantId       : e39d3de2-8d8c-4285-a31d-b4144c3d82d8 
EndpointType   : Targeted 
SipUri         : sip:joanbot@equityim.onmicrosoft.com 
PhoneNumber    : 
CallbackUri    : 
Ring           : 
ClientAudience : 

 

No default callback Uri.  I'm wondering, is this the callback endpoint that it can't reach when I try to start messaging?  I'm at a loss here as to how to define this, if so.  I can't find documentation on a specific cmdlet I can run that will let me set this value, if so.  

 

I'm quite at the end of my rope here.  What am I missing?

 

Andy

 

26 Replies

The portal has been updated.

 

Note that AppID url should be a domain in your tenant. Callback URL can be anything.

 

Thanks,

Vinay 

I have done that, my domain is a verified custom domain on Azure AD

Hi Richard

 

Thank you for the update. This should be fixed now. The App ID Uri will not have a 443 anymore.

Reach out to us if you need help further. Thanks for the feedback. We are working on improving debuggability and testability for callbacks in general. Will have more updates soon.

 

Thanks,

Renukha

Hi Patrick,

 

If you did not create this application recently, could you check if the callback url has a 443 and remove it and validate if the callback works fine as Richard had suggested.

 

Thanks,

Renukha

Hi,

I found root cause. Currently, Some Trusted Application API can run in US region of Office 365. My Office 365 tenant in Japan region. In non US region, I got error when call REST API.
Could you roll out this API to any regions? I want to this API on any regions.

Hi,

Has anyone resolved this issue?

Sometimes i am getting "CallbackUnreachable" and sometimes it is working for the same request, even though the callback is reachable...

Hello,

We are blocked on this point too.

We have a verified domain. Our App Url Id and Callback Url Id are the same and registered with the portal. Endpoint is found in the SFB user list.

However, when we speak with the bot. No callback is triggered.

What did we miss?
Thanks,

Fabien