1
votes

I'm developing an application making use of the Skype Web SDK for Skype for Business Online (https://msdn.microsoft.com/en-us/skype/websdk/developwebsdkappsforsfbonline).

I've successfully signed in a user via the SDK's signIn Manager that is preceded by an OAuth 2.0 protocol authorization code grant flow which retrieved an access_token (used by the SDK signIn Manager).

I've accomplished certain tasks such as retrieving the signed in user's list of groups, and the users associated with each group. I've also been able to retrieve some data of interest for each user, for example their displayName and status.

However, I am unable to GET a valid avatarUrl for any of the users. I am able to retrieve the avatarUrl associated with every user, which returns a url such as:

"//webpooldm12a04.infra.lync.com/ucwa/oauth/v1/applications/[id of signed in user?]/photos/[email of user who's photo is being retrieved]".

Navigating to this url returns a "401 - Unauthorized: Access is denied due to invalid credentials." server error.

Has anybody been able to retrieve a user's avatarUrl with the Skype Web SDK for Skype for Business Online?

What I have found is that when logging into office 365 (outlook.office.com/owa/?realm=[your_domain].com) and accessing Skype for Business Online (top right corner, Skype icon), the avatars for each user are retrieved by the same call:

"//webpooldm12a04.infra.lync.com/ucwa/oauth/v1/applications/[id of signed in user?]/photos/[email of user who's photo is being retrieved]".

Here, only the [id of signed in user] is different. Replacing the id in my code with the one generated via ...outlook.office.com/owa/... obviously works but only if I am already authenticated via ...outlook.office.com/owa/... and only if signed in with my user.

This leads me to believe that either the id within the avatarUrl retrieved by the Skype Web SDK for Skype for Business Online is not in fact valid, or that this issue is related to this https://github.com/OfficeDev/skype-web-sdk-samples/issues/1.

If anybody could shed any light on the issue it would be greatly appreciated.

2

2 Answers

0
votes

This is a known issue and we are working on a fix for this. The server does not reply with an Access-Control-Allow-Credentials header and so the browser is not allowed to pick up the cookie to authorize the photos request. This requires a server change and will be rolled out soon.

0
votes

Verified with Skype Wed SDK version 1.2.35. Works fine.