Skip to content

Commit afab575

Browse files
authored
fix logging audit text (#7)
1 parent ba20cbc commit afab575

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

create.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ try {
247247
switch ($actionAccount) {
248248
"Create" {
249249
#region Create account
250-
$actionMessage = "creating account with FirstName [$($account.FirstName)] and LastName [$($account.FirstName)]"
250+
$actionMessage = "creating account with FirstName [$($account.FirstName)] and LastName [$($account.LastName)]"
251251

252252
# Set ExtId with ExtID of user in Salto DB, if not available, set with person externalId
253253
if (-not [string]::IsNullOrEmpty($getSaltoAccountResponse.ExtID)) {
@@ -283,12 +283,12 @@ try {
283283

284284
$outputContext.AuditLogs.Add([PSCustomObject]@{
285285
# Action = "" # Optional
286-
Message = "Created account with FirstName [$($account.FirstName)] and LastName [$($account.FirstName)] with AccountReference: $($outputContext.AccountReference | ConvertTo-Json)."
286+
Message = "Created account with FirstName [$($account.FirstName)] and LastName [$($account.LastName)] with AccountReference: $($outputContext.AccountReference | ConvertTo-Json)."
287287
IsError = $false
288288
})
289289
}
290290
else {
291-
Write-Warning "DryRun: Would create account with FirstName [$($account.FirstName)], LastName [$($account.FirstName)] and ExtId [$($account.ExtId)]."
291+
Write-Warning "DryRun: Would create account with FirstName [$($account.FirstName)], LastName [$($account.LastName)] and ExtId [$($account.ExtId)]."
292292
}
293293
#endregion Create account
294294

@@ -353,4 +353,4 @@ finally {
353353
if ([String]::IsNullOrEmpty($outputContext.AccountReference) -and $actionContext.DryRun -eq $true) {
354354
$outputContext.AccountReference = "DryRun: Currently not available"
355355
}
356-
}
356+
}

0 commit comments

Comments
 (0)