cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajarac
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
v-micsh-msft
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
v-micsh-msft
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.

Nilson
Regular Visitor

Hello,

 

In my case worked this:

 

UsuariosdeOffice365.UserPhotoV2(User().Email)

 

Regards.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,104)