VMware Aria Automation Orchestrator

 View Only

 Configure AD User Profile Path

Jump to  Best Answer
Jinhoe's profile image
Jinhoe posted Sep 14, 2024 06:10 AM

Hi, I've created a workflow to create an AD user.

How can I further automate the configuration of the AD User Profile path to example: \\demo\profiles\%username%

Thanks

Jinhoe's profile image
Jinhoe  Best Answer

I found the way is to use setAttribute method.

Sravan_k's profile image
Sravan_k

that is correct, we can use setAttribute method as shown in below example 


// Input: user (AD:User object from the AD plugin)
var username = user.sAMAccountName; // Get the username
var profilePath = "\\\\demo\\profiles\\" + username; // Construct the profile path
 
System.log("Setting profile path to: " + profilePath);
user.setAttribute("profilePath", profilePath); // Set the AD attribute
user.update(); // Save changes to AD