我正在使用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();