You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过LDAP过滤Exchange默认系统用户?

How to Filter Out Exchange Default System Users in LDAP Queries

Absolutely, you can filter out those Exchange default system users by targeting their distinct naming patterns in your LDAP query. Here are a couple of reliable approaches:

Approach 1: Exclude by Username Prefixes

Looking at your list of system users, they all follow specific naming conventions (like starting with SystemMailbox, Migration., etc.). You can build an LDAP filter that excludes users matching these patterns while keeping regular user accounts:

(&(objectClass=User)
 (!(name=Exchange Online-*))
 (!(name=SystemMailbox*))
 (!(name=DiscoverySearchMailbox *))
 (!(name=Migration.*))
 (!(name=FederatedEmail.*))
)

Breakdown of the Filter:

  • (objectClass=User): Keeps the base condition to only retrieve user objects
  • Each !(name=PREFIX*): Uses the NOT operator (!) to exclude any user whose name attribute starts with the specified prefix. The * acts as a wildcard to match any characters following the prefix.

This filter will exclude all the system accounts you listed and retain your regular users like Zeynep Demir, Mustafa Demir, etc.

Approach 2: Filter Using Additional Attributes (Optional)

If you have access to other user attributes, you can add extra checks for more precision:

  • Some system accounts might have a userAccountControl value that marks them as disabled (though not always, so this isn't 100% reliable)
  • You could also filter for users with a valid, non-system email address (e.g., (mail=*@yourdomain.com)), but this depends on your environment's setup.

The prefix-based filter is the most straightforward and reliable for your specific case since it directly targets the naming patterns of the system accounts you identified.

内容的提问来源于stack exchange,提问作者Utku

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.06 12:57:47