Need help filtering out disabled accounts

Hi - I need help filtering out disabled accounts…

  1. Is there anyway to use the disabled account flag (userAccountControl field) as that would be the most accurate way

  2. If not and I need to look for people with no manager - I’ve got the problem that some users with no manager are showing in my org chart.

How would I write the filter SQL to

exclude where manager field is blank OR SPS-hide fromaddresslists is TRUE

3). Are there any other things I can do to help ensure disabled people don’t show up?


Hi Ian,

I’m sorry for late reply.

You can exclude disabled users on User Profiles service level. Please review this article.

By default, user profiles don’t have “userAccountControl” property mapped to AD attribute. Theoretically, you can try to set up this mapping manually to use this filed in Org Chart filtration rule. Note, in this case you may need to use JavaScript bitwise operators to work with userAccountControl value correctly.

Org Chart searches for every user profiles by default. It is by design. if you want to exclude someone from search you need to use filtration rules.

Make sure that “My site clean-up Job” is enabled.
If it is not enabled, then enable and run it. This would fix your problem.

1 Like