Hello everyone,
I'm trying to orchestrate user creation in SC Orchestrator.
Workflow would look like this:
PS Script to collect new user data > For each found user create Service Manager request > Collect data from Service Manager and pass them to Create user activity in Orchestrator
1st step is done and main code block for output looks like this:
if ($user_GC -ne $null) {
$output = foreach ($user in $user_GC) {
$properties = @{
'FirstName' = $user.GivenName
'LastName' = $user.Surname.Substring(0,1)+($user.Surname.Substring(1).tolower())
'Email' = $user.GABCustomUser3
'Department' = $user.Department
'JobTitle' = $user.Title
'Organization' = 'test'
'GUID'= ($user.GivenName.ToLower()).Substring(0,1)+'.'+$user.Surname.ToLower()
}
New-Object -Type psobject -Property $properties
$NewUserExists = $true
}
}
Output of $output variable in Orchestrator looks like this:
@{Department=; Organization=test; JobTitle=; LastName=Test; Email=testing@test.com; FirstName=test; GUID=t.test}
In Powershell I can look for found user properties by calling for example $output.FirstName but in Orchestrator it simply fails with information that such variable does not exist.
Could you please help me with this one?



