Skip to content

Commit

Permalink
Merge pull request #5250 from FabienTschanz/feat/intune-group-read-pe…
Browse files Browse the repository at this point in the history
…rmissions

Add Intune Group.Read.All permissions to generated permissions
  • Loading branch information
NikCharlebois authored Oct 23, 2024
2 parents a50ebc6 + a6fab10 commit 8072ec3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ResourceGenerator/M365DSCResourceGenerator.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<ResourceFriendlyName>' -Value $ResourceName -FilePath $settingsFilePath
Write-TokenReplacement -Token '<ResourceDescription>' -Value $resourceDescription -FilePath $settingsFilePath
Expand Down

0 comments on commit 8072ec3

Please sign in to comment.