Skip to main content

Notifications

Power Platform Community / Forums / Building Power Apps / People Picker shows th...
Building Power Apps
Answered

People Picker shows the AD disabled account.

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?

  • happyyear Profile Picture
    happyyear 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

  • happyyear Profile Picture
    happyyear 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

     

  • Verified answer
    ANB Profile Picture
    ANB 6,926 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
    happyyear 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. 

  • ANB Profile Picture
    ANB 6,926 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
    happyyear 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
    ANB 6,926 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

  • ANB Profile Picture
    ANB 6,926 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

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

September 2024 Newsletter…

September 2024 Community Newsletter…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 141,122

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,414

Leaderboard