.NET Core UserPrincipal设置PhysicalDeliveryOfficeName

时间:2019-02-19 13:05:37

标签: c# asp.net ldap

我正在使用UserPrincipal在AD中创建新用户,但是我无法设置“办公室”字段。这是使用最新版本的asp.net core 2的应用程序

我发现有一条帖子说要执行以下操作,但是找不到“ PhysicalDeliveryOfficeName”作为usr的属性。

UserPrincipal usr = new UserPrincipal(ctx);

usr.GivenName = givename;
usr.Surname = surname;
usr.PhysicalDeliveryOfficeName = "New York"; //not found
usr.Save();

0 个答案:

没有答案