Skip to content

Commit

Permalink
Merge pull request #5421 from ykuijs/Dev
Browse files Browse the repository at this point in the history
Fixing issue #5420: Added error handling to counter missing groups
  • Loading branch information
NikCharlebois authored Nov 19, 2024
2 parents 6d76c30 + 6c1c4e8 commit 8f69fc1
Show file tree
Hide file tree
Showing 13 changed files with 849 additions and 276 deletions.
40 changes: 38 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,53 @@

# UNRELEASED

* AADAdminConsentRequestPolicy
* Added error handling to Group display name retrieval to prevent errors
when an assigned group no longer exists.
* AADAuthenticationMethodPolicyAuthenticator
* Added error handling to Group display name retrieval to prevent errors
when an assigned group no longer exists.
* AADAuthenticationMethodPolicyEmail
* Added error handling to Group display name retrieval to prevent errors
when an assigned group no longer exists.
* AADAuthenticationMethodPolicyExternal
* Added error handling to Group display name retrieval to prevent errors
when an assigned group no longer exists.
* AADAuthenticationMethodPolicyFido2
* Added error handling to Group display name retrieval to prevent errors
when an assigned group no longer exists.
* AADAuthenticationMethodPolicyHardware
* Added error handling to Group display name retrieval to prevent errors
when an assigned group no longer exists.
* AADAuthenticationMethodPolicySms
* Added error handling to Group display name retrieval to prevent errors
when an assigned group no longer exists.
* AADAuthenticationMethodPolicySoftware
* Added error handling to Group display name retrieval to prevent errors
when an assigned group no longer exists.
* AADAuthenticationMethodPolicyTemporary
* Added error handling to Group display name retrieval to prevent errors
when an assigned group no longer exists.
* AADAuthenticationMethodPolicyVoice
* Added error handling to Group display name retrieval to prevent errors
when an assigned group no longer exists.
* AADAuthenticationMethodPolicyX509
* Added error handling to Group display name retrieval to prevent errors
when an assigned group no longer exists.
* AADConditionalAccessPolicy
* Fixed bug where a null value was passed in the request for the
excludePlatforms parameter when just values were assigned to includePlatforms, which throws an error.
* Fixed bug where a null value was passed in the request for the
sessionControl parameter when there are no session controls, which throws an error.
* Fixed bug where a null value was passed in the request for the
applicationEnforcedRestrictions parameter when value was set to false, which throws an error.
* AADDeviceRegistrationPolicy
* Added error handling to Group display name retrieval to prevent errors
when an assigned group no longer exists.
* AADRoleEligibilityScheduleRequest
* Adds support for custom role assignments at app scope.
* AzureBillingAccountPolicy
* Initial release.
* IntuneDeviceConfigurationPolicyAndroidDeviceOwner
* Fixed issue when properties `DetailedHelpText`,
`DeviceOwnerLockScreenMessage` or `ShortHelpText` were defined but the
Expand All @@ -33,8 +71,6 @@
* AADRoleEligibilityScheduleRequest
* FIXES [#3787](https://github.com/microsoft/Microsoft365DSC/issues/3787)
* FIXES [#5089](https://github.com/microsoft/Microsoft365DSC/issues/5089)
* AzureBillingAccountPolicy
* Initial release.
* EXOATPBuiltInProtectionRule, EXOEOPProtectionRule
* Fixed issue where empty arrays were being compared incorrectly to null
strings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,22 @@ function Get-TargetResource
elseif ($reviewer.Query.Contains('/groups/'))
{
$groupId = $reviewer.Query.Split('/')[3]
$groupInfo = Get-MgGroup -GroupId $groupId
$entry = @{
ReviewerType = 'Group'
ReviewerId = $groupInfo.DisplayName
try
{
$groupInfo = Get-MgGroup -GroupId $groupId -ErrorAction SilentlyContinue
$entry = @{
ReviewerType = 'Group'
ReviewerId = $groupInfo.DisplayName
}
}
catch
{
$message = "Group with ID $groupId specified in Reviewers not found"
New-M365DSCLogEntry -Message $message `
-Source $($MyInvocation.MyCommand.Source) `
-TenantId $TenantId `
-Credential $Credential
continue
}
}
elseif ($reviewer.Query.Contains('directory/roleAssignments?$'))
Expand Down
Loading

0 comments on commit 8f69fc1

Please sign in to comment.