So my goal is to be able to add a user from one Active Directory Domain to another group in a separate Active Directory Domain.
I'd like to do this in C#. I know there is a System.DirectoryServices namespace with classes to communicate with AD, but I can't find any information on adding users across domains.
In the environment there are two domain controllers with the same parent forest. There is a transient trust between the 2 domains, let's call them domains A and B.
I'm able to add a user from B to a Domain Local or Universal group inside of domain A with the Active Directory tool.
Does anyone know how I can do this programmatically using C#?