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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / People Picker shows th...
Power Apps
Unanswered

People Picker shows the AD disabled account.

(0) ShareShare
ReportReport
Posted on by 633

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?

Categories:
I have the same question (0)
  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at
    Re: People Picker shows the AD disabled account.

    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

  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at
    Re: People Picker shows the AD disabled account.

    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

  • happyyear Profile Picture
    633 on at
    Re: People Picker shows the AD disabled account.

    @ANB Thank you for your help. 

     

    happyyear_0-1696276885713.png

    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?

     

  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at
    Re: People Picker shows the AD disabled account.

    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_0-1696322845305.png

    ------------------------------------------------------------------------------------------------------------------------------

    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

  • happyyear Profile Picture
    633 on at
    Re: People Picker shows the AD disabled account.

    @ANB when I added this 

    Filter(Office365Users.SearchUser({searchTerm:""}), AccountEnabled = true)

    I was not able to see coworkers' names and my name. 

  • Verified answer
    ANB Profile Picture
    7,223 Super User 2025 Season 2 on at
    Re: People Picker shows the AD disabled account.

    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:

     

     

    ANB_0-1696338024978.png

     

     

    Also, do you see other names if not your and co-worker?

     

    ------------------------------------------------------------------------------------------------------------------------------

    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

     

  • happyyear Profile Picture
    633 on at
    Re: People Picker shows the AD disabled account.

    @ANB Hello thank you for your help. 

     

    I will get back to you shortly. I need to check more. Thank you

     

  • happyyear Profile Picture
    633 on at
    Re: People Picker shows the AD disabled account.

    @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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard