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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter or remove disab...
Power Apps
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

 

I have the same question (0)
  • Federico Pelliccia Profile Picture
    143 on at

    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

  • Verified answer
    Ethan_009 Profile Picture
    4,838 Moderator on at

    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

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 404

#2
timl Profile Picture

timl 344 Super User 2026 Season 1

#3
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

Last 30 days Overall leaderboard