I'm trying to set user properties for a newly created user. Properties like samaccount and userprincipalname work but other properties like address and phone number don't. I'm making use of textboxes. Here's a property example:
newUser.Properties["givenName"].Value = txt.FName
The error I get is that the field is invalid yet the other fields named above do work. Could anyone explain why this is?
I think this help you out..
You can check this article for more info: https://www.codeproject.com/Articles/18102/Howto-Almost-Everything-In-Active-Directory-via-C