diff --git a/ResourceGenerator/M365DSCResourceGenerator.psm1 b/ResourceGenerator/M365DSCResourceGenerator.psm1 index 932f7012a2..9cd5544639 100644 --- a/ResourceGenerator/M365DSCResourceGenerator.psm1 +++ b/ResourceGenerator/M365DSCResourceGenerator.psm1 @@ -967,7 +967,15 @@ class MSFT_DeviceManagementConfigurationPolicyAssignments -Workload $Workload ` -CmdLetNoun $CmdLetNoun ` -ApiVersion $ApiVersion ` - -UpdateVerb $updateVerb).permissions | ConvertTo-Json -Depth 20 + -UpdateVerb $updateVerb).permissions + if ($ResourceName -like "Intune*") + { + $resourcePermissions.application.read += @{ name = 'Group.Read.All' } + $resourcePermissions.application.update += @{ name = 'Group.Read.All' } + $resourcePermissions.delegated.read += @{ name = 'Group.Read.All' } + $resourcePermissions.delegated.update += @{ name = 'Group.Read.All' } + } + $resourcePermissions = $resourcePermissions | ConvertTo-Json -Depth 20 $resourcePermissions = ' ' + $resourcePermissions Write-TokenReplacement -Token '' -Value $ResourceName -FilePath $settingsFilePath Write-TokenReplacement -Token '' -Value $resourceDescription -FilePath $settingsFilePath