Platform SDK: Active Directory, ADSI, and Directory Services |
Users can be moved within a domain.
However, you can only move objects between domains using the movetree.exe utility. When a user is moved to a different domain, the objectSID is changed to reflect the new domain and the old objectSID is added as a value to the sIDHistory property. The objectGUID remains the same.
To move a user
If you have a pointer to the user object before it was moved, the pointer to the object is still valid, but the object's methods are no longer valid since the directory object it represents is no longer valid.
For sample code for moving objects, see Moving Groups.