Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In my vb.net code, I'm using LDAP server for authentication, and I want to update attribute values for user only if the user has write permission on that attribute. I would like to know how to do this. I did search some existing articles and questions, but could not find any solution. Any help you provide is very much appreciated.
Posted
Comments
ZurdoDev 2-Jan-14 8:14am    
System.DirectoryServices is the namespace you'll want to use to work with LDAP. http://msdn.microsoft.com/en-us/library/system.directoryservices%28v=vs.110%29.aspx
anuradha.sardesai 3-Jan-14 0:33am    
I'll take a look, thank you

1 solution

As per my comment:

System.DirectoryServices is the namespace you'll want to use to work with LDAP. http://msdn.microsoft.com/en-us/library/system.directoryservices%28v=vs.110%29.aspx[^]

When you use this if you connect to the user using the user account it will only allow you to update if you have permissions. As long as you put the code into a try catch you shouldn't have to do anything else other than just try to do the update.
 
Share this answer
 
Comments
anuradha.sardesai 7-Jan-14 0:30am    
@ryandev I'm looking at allowedAttributesEffective to check a list of attributes user has write access to. If all else fails, I'll try to update and catch the exception. Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900