cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft Prachi_2911
Microsoft

Accessing other users' profile picture.

Is there any way we can access the profile picture of othe office 365 users. We can get other details such as Department, Given name , Display name etc. using the Office365Users connection but is it possible we can get images too like in the case of User().Image for other users ?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Accessing other users' profile picture.

Hi Prachi,

 

In PowerApps studio, I created a connection to Office 365 users, I can get the User Profile, Manager, My Profile, Search User, etc. But I didn’t find a function about User Image just like User().Image.

 

This article is about “Office 365 Users”, currently, the Output properties of the profile don’t contain user Photo/Image, please refer to it.
https://powerapps.microsoft.com/en-us/tutorials/connection-office365-users/

 

you could also submit your idea at “PowerApps Ideas”:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas


Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Accessing other users' profile picture.

Hi Prachi,

 

In PowerApps studio, I created a connection to Office 365 users, I can get the User Profile, Manager, My Profile, Search User, etc. But I didn’t find a function about User Image just like User().Image.

 

This article is about “Office 365 Users”, currently, the Output properties of the profile don’t contain user Photo/Image, please refer to it.
https://powerapps.microsoft.com/en-us/tutorials/connection-office365-users/

 

you could also submit your idea at “PowerApps Ideas”:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas


Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

mckinnm2000
Level: Powered On

How can I search and return O365 user information ?

How do I  a connection to Office 365 users, so that I can get the User Profile, Manager, Search User, etc.

I created a list screen (Image, title, sub title). That specifically do I need to enter to pull back Profile, Manager, Phone number? I did setup the data source as Office365Users but it does no pull back any naes in the search. It appears to only pull back the default test data. How can I get it to pull back organizational names from O365? Any help would be greatly appreciated. thx

Please provide specifics as I am new to powerapps. Thanks

Highlighted
lnyemadden
Level: Power Up

Re: Accessing other users' profile picture.


@Prachi_2911wrote:

Is there any way we can access the profile picture of othe office 365 users. We can get other details such as Department, Given name , Display name etc. using the Office365Users connection but is it possible we can get images too like in the case of User().Image for other users ?


Option 1: This was something that I didn't know about, but is probabally the better way of going about obtaining images.

 

While I was exploring the Office365Users data source, I found that there is an Office365Users.UserPhoto() function that you can utilize to retrieve user image, just place the following into the Image property of the template image object within your gallery:

 

 

Office365Users.UserPhoto(ThisItem.Mail)

Keep in mind that this will cause an error for each user within the list that does not have a profile photo associated with their account. If you have a large number of users without photos, it may temporarily break your IDE, as it has a very large amount of errors to process.

Option 2: This method was the method I was using before I figured out that there was a function for it. This method doesn't give errors, however it also will not display images if the user doesn't have an image.

 

 

This method requires that the user is logged into their Sharepoint account on the device that they are using. Change the image property of the image template within the gallery to the following:

 

"https://outlook.office365.com/owa/service.svc/s/GetPersonaPhoto?email="& ThisItem.Mail & "&UA=0&size=HR96x96"

This should fetch the profile image from the outlook website, but note that if a user doesn't have a profile image, no image will display.

 

I created this because I couldn't find this info anywhere. I hope that this solution helps someone else!

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,668)