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 / Filter SharePoint Peop...
Power Apps
Answered

Filter SharePoint People Picker to show specific email domain users "@abc.com"

(0) ShareShare
ReportReport
Posted on by 603

How to filter SharePoint People picker in powerapps to show specific domain @abc.com. Currently my people picker Items property uses the below formula 

 

Choices([@DataSourcename].Peoplepick)

 

Included filter with Email in "@abc.com" but doesn't work. Any idea where i am wrong ?

 

Filter(Choices([@DataSourcename].Peoplepick),Email in "@abc.com")

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,417 Most Valuable Professional on at

    Try this

    Filter(Choices([@DataSourcename].Peoplepick),EndsWith(Email, "@abc.com"))
  • Iantaylor2050 Profile Picture
    603 on at

    Hi @Pstork1 ,

     

    Tried above formula already. Despite there are users in domain @abc.com, it doesn't shows up any records.

     

    Once removed the EndsWith, can see records with @abc.com

     

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

    Hi @Iantaylor2050 ,

    From your information, I think you want to filter the results inside a people picker.

    If my understand is correct, currently, there is no directly way to achieve this. When applying a Filter action to the People Picker ComboBox(Choices([@DataSourcename].Peoplepick)), the People Picker ComboBox would not show up any results.

     

    As a workaround, we can use Office 365 Users connection to achieve this. I did a test on my side for your reference.

    1. Add the Office 365 Users connection.

    2. Unlock the People Picker field DataCard in the Edit form, set the Items property of the People Picker ComboBox to following:

    Filter(Office365Users.SearchUser({searchTerm: DataCardValue6.SearchText, top:999}),EndsWith(Mail, "@abc.com"))

    valbaimsft_0-1623915486231.png

     

    Note: The top property within the Office365Users.SearchUser() could limit the returned user results, the Maximum value is 999, in other words, you could only return 999 users at most from your org once time.

     

    3. Set the Update property of the People field DataCard in the Edit form to following:

    {
     Claims: "i:0#.f|membership|" & Lower(DataCardValue6.Selected.Mail),
     DisplayName: DataCardValue6.Selected.DisplayName,
     Email: DataCardValue6.Selected.Mail,
     Department: "",
     JobTitle: "",
     Picture: ""
    }

    valbaimsft_1-1623915486235.png

     

    Check result this time.

    Best regards,

    Allen

  • mwal Profile Picture
    20 on at

    Hey Allen,  I implemented this solution but now if the field is left blank I run into a patch error. I believe this is coming from the code in the “update” portion. Do you have any ideas on how I could pass back a null value if the field is left blank? 

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 977

#2
Valantis Profile Picture

Valantis 664

#3
11manish Profile Picture

11manish 530

Last 30 days Overall leaderboard