cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajarac
Level 8

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 Team
Community Support Team

Re: Getting user name and picture

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

6 REPLIES 6
Community Support Team
Community Support Team

Re: Getting user name and picture

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

DanielaH
Level 8

Re: Getting user name and picture

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?

patrickabel
Level: Powered On

Re: Getting user name and picture

@DanielaH 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!

 

DanielaH
Level 8

Re: Getting user name and picture

Nice, thanks for the suggestion! 🙂

I will try it out.

DanielaH
Level 8

Re: Getting user name and picture

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 ?

Highlighted
RPNZ
Level: Powered On

Re: Getting user name and picture

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.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

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