Skip to content

Commit

Permalink
fix Can't deploy AADAdministrativeUnit - unexpected instance annotati…
Browse files Browse the repository at this point in the history
  • Loading branch information
salbeck-sit committed Mar 22, 2024
1 parent eb5cede commit 6910b74
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,8 @@ function Set-TargetResource
foreach ($member in $memberSpecification)
{
Write-Verbose -Message "Adding new dynamic member {$($member.Id)}"
$url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "beta/$($member.Type)/$($member.Id)"
$memberBodyParam = @{
$url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "v1.0/$($member.Type)/$($member.Id)"
'@odata.id' = $url
}

Expand Down Expand Up @@ -646,8 +646,8 @@ function Set-TargetResource
{
Write-Verbose -Message "AdministrativeUnit {$DisplayName} Adding member {$($diff.Identity)}, type {$($diff.Type)}"

$url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "beta/$memberType/$($memberObject.Id)"
$memberBodyParam = @{
$url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "v1.0/$memberType/$($memberObject.Id)"
'@odata.id' = $url
}
New-MgBetaDirectoryAdministrativeUnitMemberByRef -AdministrativeUnitId ($currentInstance.Id) -BodyParameter $memberBodyParam | Out-Null
Expand Down

0 comments on commit 6910b74

Please sign in to comment.