cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kudo Kingpin
Kudo Kingpin

Getting user name and picture

Hi there, just a quick question?

 

is there any way to get the user name, just the name and the picture form the office 365?

 

user().Fullname is what I am using and user.image. but I am getting name and last name and pictre and empty box, because I am guessing is getting from the PA account not he office 365

 

please advise. 

 

regards

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @sajarac,

 

If user() fucntion can't meet your requirements, then you may take a look at the Office 365 Users Connection:

Office 365 Users Connection in PowerApps

To get your user photo, please take a try with the method below:

Office365Users.UserPhoto(Office365Users.MyProfile().Id)

36.PNG

 

Regards,

Michael

Community Support Team _ Michael Shao
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

7 REPLIES 7
Community Support
Community Support

Hi @sajarac,

 

If user() fucntion can't meet your requirements, then you may take a look at the Office 365 Users Connection:

Office 365 Users Connection in PowerApps

To get your user photo, please take a try with the method below:

Office365Users.UserPhoto(Office365Users.MyProfile().Id)

36.PNG

 

Regards,

Michael

Community Support Team _ Michael Shao
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

Anonymous
Not applicable

Hi ,

 

Is there a way to bring in other O365 users' photos?

 

I am using the OrgBrowser template app and would like to add the user images. However at this stage it appears as if only the picture of 'oneself' (the accessing user) can be displayed, is this correct?

@Anonymous yes there is! Try the following:

Office365Users.UserPhoto(ThisItem.UserPrincipalName)

In the above example, I've got a Gallery where the items are bound to a Office365Users data-source and am then using the UserPrincipalName off of the current item to lookup the user's profile photo. Works like a charm!

 

Anonymous
Not applicable

Nice, thanks for the suggestion! 🙂

I will try it out.

Anonymous
Not applicable

Hi patrickabel 

 

I have now tried this, however could not connect the gallery to the O365Users as a datasource. Can you please tell me what you entered as being the gallery's items ?

I'm using the Org Browser app which does a search and returns a variable called First(Employee)

 

I can add the employees image buy inserting an image into a card and using data string:

 

Office365Users.UserPhoto(First(Employee).UserPrincipalName)

 

Hope this helps.

Regular Visitor

Hello,

 

In my case worked this:

 

UsuariosdeOffice365.UserPhotoV2(User().Email)

 

Regards.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (4,512)