[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Cross-Domain Group Membership Modification

Asked by Nomadics in Active Directory, Lightweight Directory Access Protocol (LDAP)

Tags: .NET Active Directory

I'm really pretty stuck here.  I'm attempting to add a group from Domain A to be a member of a group in Domain B. The group in domain a is a universal group, and the group in domain B is a Domain Local.

I can do this manually with the desired user account using Active Directory Users and Computers, but I can't get it done programmatically.  I've tried several variations, and they all fail, usually with not so helpful hints.  Here's the latest version of the code.  When I run it, I get a '
{"The server is unwilling to process the request. (Exception from HRESULT: 0x80072035)"}

If I have to, I could instead just attach the SID to the SID history, but it's not really what I want to do.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
Dim actName As NTAccount = New NTAccount("<domain>\<username>")
        Dim sid As SecurityIdentifier = actName.Translate(GetType(SecurityIdentifier))
 
        ' Once the SecurityIdentifier is get it we can get the DirectoryEntry as follow:
 
        Dim SidSearchFormat As String = "LDAP://<SID={0}>"
 
        Dim IcxPG As New DirectoryEntry("LDAP://CN=0128,ou=projects,ou=utility objects, dc=domain,dc=com")
        IcxPG.Properties("member").Add(String.Format(SidSearchFormat, sid.Value))
        IcxPG.CommitChanges()
[+][-]05/04/09 08:13 AM, ID: 24295977Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/04/09 08:33 AM, ID: 24296172Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/04/09 08:34 AM, ID: 24296189Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/14/09 03:44 PM, ID: 24390670Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/17/09 07:23 AM, ID: 24406292Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/17/09 08:34 AM, ID: 24406549Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625