Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

People Picker shows the AD disabled account.

Like (0) ShareShare
ReportReport
Posted on 2 Oct 2023 16:53:29 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 03 Oct 2023 at 19:16:18
    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 03 Oct 2023 at 13:18:40
    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,968 on 03 Oct 2023 at 13:01:20
    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 03 Oct 2023 at 12:43:45
    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,968 on 03 Oct 2023 at 08:47:36
    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 02 Oct 2023 at 20:02:21
    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,968 on 02 Oct 2023 at 17:04:10
    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,968 on 02 Oct 2023 at 16:57:08
    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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,479

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,350

Leaderboard
Loading started