Today I had the brilliant idea of building a presence logger for Skype for Business. I wanted to do preliminary research to see how viable this idea would be. Reading through the Skype documentation, it seemed like there is a nice Web SDK that can be used to build a simple application. Unfortunately, I was not able to get past the authentication phase. I presume that this was because of CORS restriction. For any development with UCWA server, the requesting domain needs to be specifically authorized. Since I don't have this access, and don't have a way to authorize the domain, I have paused my research until I can get a hold of test server. I wanted to capture the research I have done with some useful links. Total time spent on this research 3.5 hours.
Playing with postman to get responses from the server, obtained a url with
/PassiveAuth/PassiveAuth.aspx when attempted to perform a POST to endpoint
WebTicket/oauthtoken with form-ended input ```
Just while I was typing this out, I realized I was authenticating with the wrong credentials. I was using the wrong domain. Such is the power of writing things down. I was able to get an access token making a directly call to the REST API via postman, however, the web SDK got stuck. This could be because I'm running a basic non async python server or because of CORS related issues when the request is made via the browser adding originating errors.
The required API for building this kind of API is the UCWA API. In order to use it, the requesting server URL, that is passed via the
X-Ms-Origin header needs to be setup on the Lync/UCWA server.