Skip to content

Commit

Permalink
Merge pull request microsoft#4679 from bartvermeersch/FixAdministrati…
Browse files Browse the repository at this point in the history
…veUnit

Fix Properties of (Dynamic) Administrative Unit
  • Loading branch information
ykuijs authored Aug 27, 2024
2 parents 87590f0 + 3edd424 commit c1ab374
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# UNRELEASED

* AADAdministrativeUnit
* Fix Properties for Dynamic Administrative Units in Graph have moved
* AADConditionalAccessPolicy
* Fixing issue where the resource crashed when trying to retrieve groups
and users from Entra ID which no longer existed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,17 @@ function Get-TargetResource
#endregion
}

if (-not [string]::IsNullOrEmpty($getValue.AdditionalProperties.membershipType))
if (-not [string]::IsNullOrEmpty($getValue.membershipType))
{
$results.Add('MembershipType', $getValue.AdditionalProperties.membershipType)
$results.Add('MembershipType', $getValue.membershipType)
}
if (-not [string]::IsNullOrEmpty($getValue.AdditionalProperties.membershipRule))
if (-not [string]::IsNullOrEmpty($getValue.membershipRule))
{
$results.Add('MembershipRule', $getValue.AdditionalProperties.membershipRule)
$results.Add('MembershipRule', $getValue.membershipRule)
}
if (-not [string]::IsNullOrEmpty($getValue.AdditionalProperties.membershipRuleProcessingState))
if (-not [string]::IsNullOrEmpty($getValue.membershipRuleProcessingState))
{
$results.Add('MembershipRuleProcessingState', $getValue.AdditionalProperties.membershipRuleProcessingState)
$results.Add('MembershipRuleProcessingState', $getValue.membershipRuleProcessingState)
}

Write-Verbose -Message "AU {$DisplayName} MembershipType {$($results.MembershipType)}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
DisplayName = 'DSCAU'
Id = 'DSCAU'
Visibility = 'Public'
AdditionalProperties = @{
membershipType = 'Assigned'
membershipRule = 'Canada'
membershipRuleProcessingState = 'On'
}
MembershipType = 'Assigned'
MembershipRule = 'Canada'
MembershipRuleProcessingState = 'On'
}
}

Expand Down Expand Up @@ -303,9 +301,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Description = 'DSCAU Old Description'
DisplayName = 'DSCAU'
Id = 'DSCAU'
AdditionalProperties = @{
membershipType = 'Assigned'
}
MembershipType = 'Assigned'
}
}

Expand Down

0 comments on commit c1ab374

Please sign in to comment.