4.1.1 ADsPath

Active Directory defines a naming convention that can uniquely identify an Active Directory object in a heterogeneous environment. These names are called ADsPath strings. ADsPath strings are COM display names. Two formats are supported: URL format and COM format. The preferred format is URL format. Providers must support both formats.

The value of <NamespacesId> corresponds to the PROGID of the namespaces container object. For Active Directory Version 1.1, the PROGID of the namespaces container is ADS. Specifying "ADS:" or "@ADS!" identifies the target component as the namespaces container.

Specifying "<NamespaceId>://" or "@<NamespaceId>!//" identifies the target component as the namespace container object of name <NamespaceId>. The value of <NamespaceId> corresponds to a PROGID of an installed Active Directory provider. Available namespace objects can be enumerated from the namespaces container.

Specifying "<NamespaceId>://<ProviderSpecificPath>" or "@<NamespaceId>!//<ProviderSpecificPath>" identifies the target component as an Active Directory object in the namespace indicated by <NamespaceId>. The <ProviderSpecificPath> is a string value that must uniquely identify a directory service object in the given namespace. Each provider is responsible for determining the semantics of this string. A few example paths are:

Provider Specific Path

Remarks

"MSFT/Users/John"

Identifies a user object in a file-system like path MSFT\Users.

"CN=John.OU=Users.O=MSFT"

Identifies a user object named John in a organizational unit named Users, in an organization named MSFT.

"MSFT/Users/John!User"

Identifies an object in MSFT\Users. The !User suffix indicates that the object is of class user. A class suffix is necessary in namespaces that allow two objects of the same name in one container.


4.1.1.1 URL Format

<ADsPath>::=<NamespacesId>"://"

|<NamespaceId>"://"

|<NamespaceId>"://"<ProviderSpecificPath>

The recommended format for the <ProviderSpecificPath > is string path elements delimited by forward slash characters ("/"), for example "WinNT://root_domain/machinename/JamesSmith".

4.1.1.2 COM Format

The COM format is supported for compatibility with the original COM format for display names, in which the leading "@" and trailing "!" delimit the PROGID part of the name.

<ADsPath>::="@"<NamespacesId>"!//"

|"@"<NamespaceId>"!//"

|"@"<NamespaceId>"!//"<ProviderSpecificPath>

4.1.1.3 Format of COM ProgIds

COM ProgId's are CASE SENSITIVE. "WinNT" is different than "winnt". When naming the provider in the Active Directory Path, the case of the provided ProgID must match the value registered in the registry EXACTLY.

The format of an ADsPath string is similar to that of an COM moniker display name. In the same way that binding to an COM moniker returns the interface pointer on an object, binding to an ADsPath string returns an interface pointer on an Active Directory object.

Note that all Active Directory objects have 3 properties relating to their Active Directory path:

Parent - this is the Active Directory Path of the objects parent. The parent can always be retrieved using this string.

ADsPath - this is the Active Directory Path to this object. This object can always be retrieved using this path.

Name - this is the leaf name of this object. This is the name that distinguishes this object from its siblings.

Note that there is no implied ability in Active Directory to form the Active Directory Path of a given object from its Parent and Name properties. While this operation might work for some Active Directory providers, this is purely a side effect of a specific implementation and is not guaranteed to work for other implementations. Users are advised to avoid using Parent and Name to form an Active Directory path. The ADsPath property of an object is guaranteed to be valid, and this is what should be used.