From your description, it seems that you want to modify the object properties in an Active Directory Hierarchy. If that is the case, you can use the
DirectoryEntry class to retrieve a node from an Active Directory hierarchy and modify its property content.
You could refer to the following steps:
Create an instance of the DirectoryEntry component, binding it to the known object in the active directory hierarchy with the object's path.
Make the necessary changes to the object's properties by referring to it by name.
Call the
CommitChangesmethod save your modifications to the item in the directory.
Please Note: You must have administrator rights to a directory in order to modify any of its information.
Besides, since this issue is related to the Active Directory, if you have any further question about Active Directory, I suggest you could post you problem to Active Directory forum: http://forums.asp.net/93.aspx/1?Active+Directory+and+LDAP
Best regards,
Dillion
ActiveDirectoryC
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Thanks. It's working. Now how to change those data and where can I find full list of parameters like sAMAccountName. Shortly, how to get any oher data (how they are called) ??
Member
5 Points
44 Posts
Change data in AD
Oct 01, 2015 03:17 AM|Kremius|LINK
Hi to all,
Is there possibility to create website with I will be able to change user information like email, address, phone number in ActiveDirectory ??
Thanks in advance for answer
ActiveDirectory C
All-Star
45489 Points
7008 Posts
Microsoft
Re: Change data in AD
Oct 01, 2015 10:23 PM|Zhi Lv - MSFT|LINK
Hi Kremius,
From your description, it seems that you want to modify the object properties in an Active Directory Hierarchy. If that is the case, you can use the DirectoryEntry class to retrieve a node from an Active Directory hierarchy and modify its property content.
You could refer to the following steps:
For more details, please refer to this article: https://msdn.microsoft.com/en-us/library/dx0d151f%28v=vs.71%29.aspx?f=255&MSPPError=-2147217396
Please Note: You must have administrator rights to a directory in order to modify any of its information.
Besides, since this issue is related to the Active Directory, if you have any further question about Active Directory, I suggest you could post you problem to Active Directory forum: http://forums.asp.net/93.aspx/1?Active+Directory+and+LDAP
Best regards,
Dillion
ActiveDirectory C
Member
5 Points
44 Posts
Re: Change data in AD
Oct 02, 2015 09:47 AM|Kremius|LINK
Could you make a 'sample' because I don't really know how to do it (let's say that I'm new in ASP NET) ;)
Thanks in advance :)
ActiveDirectory C
Member
5 Points
44 Posts
Re: Change data in AD
Oct 15, 2015 07:42 AM|Kremius|LINK
Hi again,
I have something like this:
How to change it to display all information from AD for user name in TextBox3.Text ??
ActiveDirectory C
All-Star
35149 Points
9075 Posts
Re: Change data in AD
Oct 15, 2015 08:24 AM|smirnov|LINK
You display only specific attribute
To display other attributes, you need to specify them
Note, that some of the attributes might be indexed, i.e. might be designed for multiple values and might need to be called with index, e.g.
Also note that it might be required to tell to LDAP that you want to get specific parameter using PropertiesToLoad collection
And if you want to display really all attributes, you could try to enumerate them as
Hope this helps.
ActiveDirectory C
Member
5 Points
44 Posts
Re: Change data in AD
Oct 19, 2015 02:53 AM|Kremius|LINK
Thanks. It's working. Now how to change those data and where can I find full list of parameters like sAMAccountName. Shortly, how to get any oher data (how they are called) ??
ActiveDirectory C
Member
5 Points
44 Posts
Re: Change data in AD
Oct 26, 2015 11:42 AM|Kremius|LINK
Nothing about it that you can help me ?
ActiveDirectory C