[DllImport("ntdsapi.dll", CharSet = CharSet.Unicode, SetLastError = true)] public static extern int DsMakePasswordCredentials( string UserName, string Domain, string Password, out IntPtr pAuthIdentity );
Microsoft documentation: Link
Last updated 1 year ago