0

Using System.DirectoryServices.Protocols (S.DS.P), I need to add UserX from directory A to GroupY in directory B.

My ModifyRequest contains DistinguishedName of GroupY and UserX.

Send request throw a DirectoryOperationException with result code NoSuchObject.

I see, however, that the same operation is workable using the ActiveDirectory console (MMC snap-in). A ForeignSecurityPrincipal object is created in directory B and referenced as member of GroupY.

nlips
  • 1,258
  • 9
  • 25
  • See if [this](http://stackoverflow.com/questions/8086322/userprincipal-findbyidentity-insists-there-is-no-such-object-on-the-server) helps – CodingYoshi Jan 12 '17 at 18:18

1 Answers1

0

The solution is to use the syntax <SID=...> (replace ... by UserX objectSid) as the attribute value in the ModifyRequest object.

nlips
  • 1,258
  • 9
  • 25