We've got Okta pushing manager first.last to extensionAttribute3 in ARS. I need a workflow that will convert that to a DN to drop into the manager field. However, no matter what I do, it doesn't want to get from any attributes.
Workflow setup:
On Demand
EA3 Search - Filters from an OU with 4 users. No other filters in place. --> Run Script: First.Last to DN
First.Last to DN script
function onPostModify($Request) { $sourceObj = $workflow.FoundObject("EA3").get("DN") $manager = get-aduser -identity $sourceObj -properties extensionattribute3 | select -expandproperty extensionattribute3 $managerDN = (get-aduser -id $manager).distinguishedname $dirobj.put("manager", $managerDN) $DirObj.SetInfo() }
The error I get when I try to run the workflow with the script is:
At line: 3 char:1. Exception calling "Get" with "1" argument(s): "Object reference not set to an instance of an object."