[Active Directory] Create a user on a specific OU

[Active Directory] Create a user on a specific OU

Forge Component
Published on 12 Jul by Renato Pauleta
5 votes
Published on 12 Jul by Renato Pauleta


I am trying to create a new user on AD using the Active Directory component. I've created a new user but I needed admin privileges to do it and the new user was created on the OU Users.

Is it possible to specify the OU where we want to create a user and have permissions to create users only on that OU (instead of having admin privileges)?



Hi Vânia,

You'd need to make a few changes. Most of the component methods use AD_SetGlobalDomain action and it's what defines the context in which changes are done to the AD. It was done this way to be simple, but I see your point.

The changes include changing the .NET code by extending the AD_SetGlobalDomain action to also capture the OU. Finally in the ActiveDirectoryCore module, in service studio, you'd need to make sure that the AD_UserCreate action also has some adittional input parameters such as OU, Username, Password (so you can save with different users).

Personally, I'd like to extend the code myself, I feel it's a good adition to the component, but I don't know when I'll have the time. If you're able to do it, let me know, I'd be happy to release a new version.

Thanks for your input.