[DllImport("ntdsapi.dll", CharSet = CharSet.Unicode, SetLastError = true)] public static extern int DsBindWithCred( string DomainControllerName, string DnsDomainName, IntPtr AuthIdentity, out IntPtr phDS );
Microsoft documentation: Link
Last updated 1 year ago