2

System.Security.Principal.NTAccountオブジェクトを作成して System.Security.Principal.SecurityIdentifier に転送したいので、それを使用して .Net C# の Active Directory に新しいアクセス ルールを追加できます。

この形式を使用する場合:

  System.Security.Principal.IdentityReference newOwner new System.Security.Principal.NTAccount("DUDUG");
  newOwner.Translate(typeof(System.Security.Principal.SecurityIdentifier);

転送できますが、ユーザーは AD で「不明なユーザー」に変換されます

私が使用する場合:

System.Security.Principal.IdentityReference newOwnernew System.Security.Principal.NTAccount("dudu.test.com","DUDUG")

また

System.Security.Principal.IdentityReference newOwnernew System.Security.Principal.NTAccount("//dudu.test.com/temp","DUDUG")

また

System.Security.Principal.IdentityReference newOwnernew System.Security.Principal.NTAccount("LDAP://dudu.test.com/CN=Dudu,OU=TEST,DN=DUDU,DN=TEST,DN=COM","DUDUG")

エラーメッセージが表示されます:

System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated.

それがどのように行われたかについてのアイデアはありますか?

前もって感謝します。

4

0 に答える 0