When using a custom script module inside of a Workflow, the $Workflow.FoundObject method returns a NULL value when attempting to retrieve the userPrincipalName of a found User.
For example:
function findUsers($Request)
{
$samAccountName = $workflow.FoundObject("Search for objects").get("samAccountName")
$dn = $workflow.FoundObject("Search for objects").get("distinguishedName")
$upn = $workflow.FoundObject("Search for objects").get("userPrincipalName")
}
$samAccountName and $dn will both be populated with those respective attribute values from a found object, while $upn will be NULL.
This issue is being tracked as Defect ID 541768.
WORKAROUND
Retrieve another attribute from the Workflow context, like the distinguishedName, and then use the Active Roles Management Shell to retrieve the userPrincipalName
For example:
function findUsers($Request)
{
$samAccountName = $workflow.FoundObject("Search for objects").get("samAccountName")
$dn = $workflow.FoundObject("Search for objects").get("distinguishedName")
$upn = (get-QADUser $dn).userPrincipalName
}
STATUS
Waiting for fix in a future release of Active Roles.
© 2025 One Identity LLC. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center