Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

DirectoryEntry.NativeGuid Property

Gets the GUID of the DirectoryEntry, as returned from the provider.

Namespace: System.DirectoryServices
Assembly: System.DirectoryServices (in system.directoryservices.dll)

public string NativeGuid { get; }
/** @property */
public String get_NativeGuid ()

public function get NativeGuid () : String

Not applicable.

Property Value

A Guid structure that represents the GUID of the DirectoryEntry, as returned from the provider.

Use the NativeGuid property when binding an object in Active Directory.

NoteNote:

The Lightweight Directory Access Protocol (LDAP) provider returns the globally unique identifier of a DirectoryEntry in a different format than the Internet Information Services (IIS), Novell NetWare Directory Server (NDS), and WinNT providers.

The following example demonstrates the Guid and NativeGuid properties of the DirectoryEntry class. This example gets the user-specified DirectoryEntry and displays its Guid and NativeGuid properties.

String myADSPath = "LDAP://onecity/CN=Users,
             DC=onecity,DC=corp,DC=fabrikam,DC=com";
DirectoryEntry myDirectoryEntry=new DirectoryEntry(myADSPath);

// Display the Guid and NativeGuid.
Console.WriteLine("The GUID of the ADS object:"+
                  myDirectoryEntry.Guid);
Console.WriteLine("The Native GUID of the ADS"+
                  "object:"+myDirectoryEntry.NativeGuid);

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.