Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

Filter or remove disabled users in the environment

(0) ShareShare
ReportReport
Posted on by 3

Hi!

I am working in a model driven app. When we are assigning a task from the task-table to someone i want to only get a list over the people who are active in the current environment.

 

I've set a security group for the environment to limit access to only people within that security group. But when i want to choose an owner of a task i can choose between everyone in the organisation. 

 

When i check the users who are in the environment i see that everyone is there, but the only difference is that those who are in the security group is "Active" and the ones who are not is "Disabled". 

Problem is i cant filter on that in the User table. 

 

Any suggestions?

PrebenF_0-1683713917098.png

 

  • Verified answer
    Ethan_009 Profile Picture
    4,838 Super User 2025 Season 1 on at
    Re: Filter or remove disabled users in the environment

    Hi @PrebenF ,

     

    There's another method, 

    Open the Form and click on the Lookup Field

    You will see the View that is used on that Lookup, you can set to 'Active Users' or any custom views as per your choice.

     

    Hope this helps

  • Federico Pelliccia Profile Picture
    142 on at
    Re: Filter or remove disabled users in the environment

    So, if I understand correctly, you would filter the lookup showing only active (not disabled) Users, right?
    If so, you can use a custom javascript code 
    addCustomFilter (Client API reference) in model-driven apps - Power Apps | Microsoft Learn
    There you can see an example. With that, you can write something like

     

    <filter>
     <condition attribute='isdisabled' operator='eq' value='0' />
    </filter>

    But remember that you have to use this method passing before the addPreSearch on onLoad method of your javascript
    addPreSearch (Client API reference) in model-driven apps - Power Apps | Microsoft Learn

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

Overall leaderboard

Featured topics