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 list of Emails fro...
Power Apps
Answered

Get list of Emails from a SharePoint List of Users

(0) ShareShare
ReportReport
Posted on by 169

i have a SharePoint List('Admin Users') which basically has one column that is a people field(User). i want to be able to extract the emails into the app as a Table with one column where each value is the email of the user.

 

Any ideas?

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @Gottijay2000 

    For example, let's say your SharePoint List 'Admin Users' looks like this.  Username is a People type column.

     

    Username
    Anne Black
    Kelly Johnson
    Jessica Finch 

     

    To make a collection holding the email of each user you can use this code in the OnVisible property of the screen.

    Clear(myEmailsList);
    ForAll('Admin Users', Collect(myEmailsList,{Value: Username.Email}))

     

    Now if you create a Data Table and put this code in the Items property...

    myEmailsList

     

    ...The Data Table will look like this in your app.

     

    Value
    ablack@yourcompany.com
    kjohnson@yourcompany.com
    jfinch@yourcompany.com

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

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

    Hi @Gottijay2000 ,

    Do you want to get a one column table where each value is the email addresses of the user in 'Admin Users'?

    Can you tell me whether the person field(User) allows multiple people?

    I’ve made a similar test for your reference:

    Case 1: The person field(User) does not allow multiple people.

    1\ Add a button control and set the control’s OnSelect property to:

    Clear(Emailofusers); /* ‘Emailofusers’ is a collection that will be created by the following code*/ /*Clear the collection ‘Emailofusers’ before getting the data*/
    
    ForAll( /*traversal each records of 'Admin Users'*/
    
     'Admin Users',
    
     Collect(
    
     Emailofusers, 
    
     {emailaddress: User.Email} /*get the email of user*/ /*User is the column name of the people field(User)*/
    
     )
    )

    2\ You will get a one column table(Emailofusers) where each value is the email of the user by clicking the button.

     

    Case 2: The person field(User) allows multiple people.

    1\ Add a button control and set the control’s OnSelect property to:

    Clear(Emailofusers); /* ‘Emailofusers’ is a collection that will be created by the following code*/ /*Clear the collection ‘Emailofusers’ before getting the data*/ 
    
    ForAll( /*traversal each records of 'Admin Users'*/
    
     'Admin Users',
    
     ForAll( /*traversal each records of ‘User’*/
    
     User,
    
     Collect(
    
     Emailofusers,
    
     {emailaddress: Email} /*get the email of user*/ 
    
     )
    
     )
    
    )

    2\ You will get a one column table(Emailofusers) where each value is the email of the user by clicking the button.

     

     

    394.jpg

     

    If you still have any question please don’t hesitate to let us know.

     

     

    Best Regards,

  • Gottijay2000 Profile Picture
    169 on at

    @mdevaney @v-yutliu-msft 

    thanks again for your help. This worked great

  • debomark Profile Picture
    9 on at

    THANK YOU GURU I have searched high and low for hours on how to get this exact answer - there is zero out there that I could find except for this post to ansewer "How to I collect the email adress of each person in a SharePoint list column of type'Person' where you can cave multiple users.

    I registered just to kudos and reply as I am so very grateful. There is so little info on this, and if so, nothing with such a generous explanatory working sample.

  • Sidhant_02 Profile Picture
    986 on at

    Hi @mdevaney , @v-yutliu-msft ,
    I want to retrieve an email address from SharePoint List for a particular value.
    Scenario: I have sharepoint list which consists of:

    Sidhant_02_0-1676962191608.png

    Sidhant_02_1-1676962220404.png

    So in the above image (Silly:Title) Role: is a choice column which has values Employee, Manager, Administrator so if the role: Administrator I want to send an email, so how to retrieve the email based on choice column value (which should be Administrator) 
    Is there any way to do it, please let me know.

    Regards,
    Sidhant 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard