我们有两个具有单向信任的域。
将外部单向信任配置为域 INT 的域 EXT。所以我想通过使用 EXT 域用户凭据连接到 EXT 域并搜索 INT 域中的用户。
问题- 是否可以通过使用默认 API 来实现?:
var found = UserPrincipal.FindByIdentity(context,
IdentityType.SamAccountName, 'a.someone');
其中 'a.someone' 是来自 INT 域的用户的 SamAccountName。
其中“上下文”初始化如下:
var contextOptions = ContextOptions.Negotiate |
ContextOptions.Signing | ContextOptions.Sealing;
var context = new PrincipalContext(ContextType.Domain, "EXT.loc",
null, contextOptions, "EXT\\Administrator", "password");