web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / get data photos and pr...
Power Apps
Answered

get data photos and principle name office365users in power apps

(0) ShareShare
ReportReport
Posted on by

How can I get data such as photos and user principle names of all employees in outlook/office365users? as well as lookup based on the name in office365user with my collection name? I get an error

 

adesinaga_0-1687491951524.png

 

I'm very happy if anyone wants to help

Thankyou

Categories:
I have the same question (0)
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    I am not aware of this so i got a little help from ChatGPT.

    Here's what i came up with:

    To retrieve data such as photos and user principal names of all employees in Office 365 Users in Power Apps, you can use the Office365Users connector. Here's an example of how you can achieve this:

    1. Add the Office365Users connector to your app. To do this, go to the "View" menu in the Power Apps editor, click on "Data sources," and then select "Office365Users" from the list.

    2. To retrieve the user principal names, you can use the following formula:

     

    Office365Users.UserProfileV2().Mail

     

    This formula will return a table containing the user principal names of all employees.

    1. To retrieve the photos, you can use the following formula:

     

    GUBGMHVpwcTsPFvNNVdG5DKtpv6UwksAfzw5aULcGzgG

     

    This formula will return a table containing the metadata of the user photos.

    1. If you want to perform a lookup based on a name in the Office365Users connector with your own collection, you can use the LookUp function. For example, if you have a collection called MyCollection and you want to find a user based on their name, you can use the following formula:

     

    LookUp(MyCollection, Name = "John Doe").Email

     

    This formula will return the email address of the user with the name "John Doe" from your collection.

    Make sure to replace "MyCollection" with the name of your actual collection and adjust the property names as per your collection structure.

    Remember to use the appropriate controls in your Power App, such as galleries or data tables, to display the retrieved data.

    If you encounter any specific error messages or issues, please provide more details, and I'll be happy to assist you further.

    Mark as solution if this solves your issue. Give thumbs up. Thanks

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @adesinaga ,

     

    Please try:

    Office365Users.UserPhotoV2(User().Email)

    vbofengmsft_0-1687498602298.png

     

    Best Regards,
    Bof

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 404

#2
timl Profile Picture

timl 344 Super User 2026 Season 1

#3
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

Last 30 days Overall leaderboard