Skip to content

Commit

Permalink
Merge pull request #129 from AdamWillford/dev
Browse files Browse the repository at this point in the history
Fix removed values not being pushed on Edit User
  • Loading branch information
KelvinTegelaar authored Mar 18, 2022
2 parents 78f1007 + 01ce74d commit 93e5687
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EditUser/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ try {
"forceChangePasswordNextSignIn" = [bool]$UserObj.mustchangepass
}
} | ForEach-Object {
$NonEmptyProperties = $_.psobject.Properties | Where-Object { $_.Value } | Select-Object -ExpandProperty Name
$NonEmptyProperties = $_.psobject.Properties | Select-Object -ExpandProperty Name
$_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json
}
$GraphRequest = New-GraphPostRequest -uri "https://graph.microsoft.com/beta/users/$($userobj.Userid)" -tenantid $Userobj.tenantid -type PATCH -body $BodyToship -verbose
Expand Down

0 comments on commit 93e5687

Please sign in to comment.