Skip to content

Commit

Permalink
Update Set-AzPolicyAssignmentRestMethod.ps1 (#512)
Browse files Browse the repository at this point in the history
managedIdentityLocation is an array and need to be converted as a string so the API would allow the creation of the policy assignment

https://learn.microsoft.com/en-us/rest/api/policy/policy-assignments/create-by-id?view=rest-policy-2023-04-01&tabs=HTTP
  • Loading branch information
mbrousseaufx authored Mar 25, 2024
1 parent 2fbb56f commit 09c4516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Scripts/Helpers/Set-AzPolicyAssignmentRestMethod.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function Set-AzPolicyAssignmentRestMethod {
}
}
if ($AssignmentObj.identityRequired) {
$assignment.location = $AssignmentObj.managedIdentityLocation
$assignment.location = $AssignmentObj.managedIdentityLocation | Select-Object -First 1
}
if ($parameters.psbase.Count -gt 0) {
$assignment.properties.parameters = $parameters
Expand Down

0 comments on commit 09c4516

Please sign in to comment.