Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 29, 2011 04:45 AM by Tamilmani Kpr
Member
19 Points
131 Posts
Jun 28, 2011 04:19 PM|LINK
OK here's the deal I can set all the other properties and create the account. However, I can't set the "memberof" attribute.
users.Properties["memberof"].Value = "CN=dkdkd,DC=dkdk etc..."
As I understand the "memberof" attribute is a "backlinked" property (read-only) and has to be set using another method.
Can someone show an example as to how this is set
All-Star
24182 Points
3719 Posts
Jun 28, 2011 05:19 PM|LINK
You have to add the user to an active directory grou. You cannot edit it here
http://www.dotnettreats.com/tipstricks/adnet.aspx
Contributor
2143 Points
458 Posts
Jun 28, 2011 11:33 PM|LINK
You will need to search for the group and then add the user to it using the user's Distinguished name.
You can see examples for this and other things here, http://www.codeproject.com/KB/system/everythingInAD.aspx
Participant
1091 Points
265 Posts
Jun 29, 2011 04:45 AM|LINK
You have to add the user's distinguishedname to the member attribute.
Try this...
groupEntry.Properties["member"].Add( "CN=dkdkd,DC=dkdk");
Regards, Tamilmani.
steppinthrax
Member
19 Points
131 Posts
How do you set the "memberof" attribute
Jun 28, 2011 04:19 PM|LINK
OK here's the deal I can set all the other properties and create the account. However, I can't set the "memberof" attribute.
Jeev
All-Star
24182 Points
3719 Posts
Re: How do you set the "memberof" attribute
Jun 28, 2011 05:19 PM|LINK
You have to add the user to an active directory grou. You cannot edit it here
http://www.dotnettreats.com/tipstricks/adnet.aspx
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you get the answer to your question, please mark it as the answer.
gww
Contributor
2143 Points
458 Posts
Re: How do you set the "memberof" attribute
Jun 28, 2011 11:33 PM|LINK
You will need to search for the group and then add the user to it using the user's Distinguished name.
You can see examples for this and other things here, http://www.codeproject.com/KB/system/everythingInAD.aspx
Tamilmani Kp...
Participant
1091 Points
265 Posts
Re: How do you set the "memberof" attribute
Jun 29, 2011 04:45 AM|LINK
You have to add the user's distinguishedname to the member attribute.
Try this...
groupEntry.Properties["member"].Add( "CN=dkdkd,DC=dkdk");
Efforts Never Fail...