Skip to content

Commit

Permalink
Merge pull request #5464 from NikCharlebois/Fixes-#5430
Browse files Browse the repository at this point in the history
Fixes #5430
  • Loading branch information
NikCharlebois authored Nov 25, 2024
2 parents 5b53c37 + 616d2a1 commit 5ec749e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
* Added logic to update an existing recipient's permissions.
* EXOTransportRule
* Changed how empty arrays are returned.

* IntuneAndroidManagedStoreAppConfiguration
* Initial release.
* IntuneAppConfigurationPolicy
* Fixes an issue where assignment wasn't properly set if the
groupId was null.
FIXES [#5430](https://github.com/microsoft/Microsoft365DSC/issues/5430)
* TeamsUserPolicyAssignment
* Added support for the Global policies.
* TeamsUpgradePolicy
Expand Down
6 changes: 5 additions & 1 deletion Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,11 @@ function ConvertTo-IntunePolicyAssignment
}
elseif ($assignment.dataType -like '*GroupAssignmentTarget')
{
$group = Get-MgGroup -GroupId ($assignment.groupId) -ErrorAction SilentlyContinue
$group = $null
if (-not [System.String]::IsNullOrEmpty($assignment.groupId))
{
$group = Get-MgGroup -GroupId ($assignment.groupId) -ErrorAction SilentlyContinue
}
if ($null -eq $group)
{
if ($assignment.groupDisplayName)
Expand Down

0 comments on commit 5ec749e

Please sign in to comment.