大网数据广告活动
域与目录服务

Finding a List of Attributes To Query

· 52CE 我爱测

When searching for objects of a particular class, comparisons in your search filter should specify attributes that actually exist on the objects of that class.

When searching for objects of a particular class, comparisons in your search filter should specify attributes that actually exist on the objects of that class. To get the list attributes on an object of a particular class, bind to that class in the abstract schema and retrieve the IADsClass.MandatoryProperties and IADsClass.OptionalProperties properties. For more information, see Reading the Abstract Schema.

In addition, all objects inherit from the top abstract class. Therefore, any attribute in top can exist, although it may not be set, on any object.

If searching the global catalog, ensure that you specify attributes in the global catalog. Attributes included in the global catalog have the isMemberOfPartialAttributeSet set to TRUE on their attributeSchema objects. Be aware that this data is not available in the abstract schema; read it from the attributeSchema object in the schema container.

In the global catalog, a back link attribute can be queried only if both of the following conditions are met: First, the attribute is marked for inclusion in the global catalog. Second, the corresponding forward link is also marked for inclusion in the global catalog. This applies to query filters as well as query results. For more information, see Linked Attributes.

In addition, some attributes, mostly on the user object, are constructed. Query filters cannot contain constructed attributes. Constructed attributes cannot be evaluated in query filters; however, they can be returned in query results. This applies to all the naming contexts and the global catalog. Attributes that are constructed have ADS_SYSTEMFLAG_ATTR_IS_CONSTRUCTED (0x00000004) in the systemFlags property on their attributeSchema objects.

Note:
For more information about predefined classes and attributes included with the system, see Active Directory Domain Services Reference. These pages list mandatory and optional attributes of each object class. For attributes, the reference page indicates whether the attribute is indexed, constructed, linked, or in the global catalog.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。