SOLVED

How do you programmatically get the profile image that Teams uses in chat?

Copper Contributor

In my company Teams instance, I noticed that my chat messages, and those of my colleague, all have profile images. However, when I log in to Teams or go to My Account (https://myaccount.microsoft.com/?ref=MeControl) I do not have a profile picture set.

 

The reason I'm asking is I'm writing a Bot Framework v4 Bot and I want to access the profile pic of the user sending my bot a message. However, when I use the Graph API (https://graph.microsoft.com/v1.0/me/photo/$value), I get the photo is not found. Well that makes sense, I do not appear to have a photo according to Azure AD.

 

So I'd like to understand where does Teams get its profile pic and how do I access that from my bot?

1 Reply
best response confirmed by ThereseSolimeno (Microsoft)
Solution
So I tried this with the Beta API and I got the photo! https://graph.microsoft.com/beta/me/photo/$value
1 best response

Accepted Solutions
best response confirmed by ThereseSolimeno (Microsoft)