Hello All,
Can you do me a favor?
I'm utilizing SharePoint for the Power App form.
Is there a way to exclude disabled Active Directory accounts from appearing in the people picker when the form is created? Any formula or solution?
Hi @happyyear , You need to do a filter on AccountEnabled property to true.
-----------------------------------------------------------------------------------------------------------------------------I hope this helps.Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.Thanks,ANB
Hi @happyyear Try this:
Filter(Office365Users.SearchUser({searchTerm:""}), AccountEnabled = true)
This should be on Item property of People picker which could be dropdown or combo box. Also before using this, make sure to add Office365Users connection.
------------------------------------------------------------------------------------------------------------------------------I hope this helps.Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.Thanks,ANB
@ANB Thank you for your help.
This is a data card and I added the formula you gave and connected office 365 users to power apps.
But so far, It didn't work. Is there any way to make it work?
Hi @happyyear , What is issue? I mean when you say did not work, then can you explain it? You need to have the fields to:
@ANB when I added this
I was not able to see coworkers' names and my name.
Hi @happyyear , Did you saw my previous reply? For your data card where you are adding the above code, you need to check the field property as shown in below screenshot:
Also, do you see other names if not your and co-worker?
@ANB Hello thank you for your help.
I will get back to you shortly. I need to check more. Thank you
@ANB Yes, it worked. But there are other accounts, like group accounts, that need to be removed, but I don't know how to do it. Anyway, I was able to remove the disabled accounts. Thank you so much
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 757 Most Valuable Professional
Michael E. Gernaey 322 Super User 2025 Season 2
MS.Ragavendar 209 Super User 2025 Season 2