Intune-Scripts icon indicating copy to clipboard operation
Intune-Scripts copied to clipboard

Get-AllAadGroupAssignments/Get-AllAadGroupAssignments.ps1

Open SquirrelAssassin opened this issue 1 year ago • 0 comments

I was getting permissions errors from Line 171

$graph = Connect-MgGraph -Scopes DeviceManagementConfiguration.Read.All, DeviceManagementApps.ReadWrite.All

update this to

$graph = Connect-MgGraph -Scopes DeviceManagementConfiguration.Read.All, DeviceManagementApps.Read.All, DeviceManagementServiceConfig.Read.All, group.read.all

removes the write permissions and allows the autopilot and enrollment to work and also allows you to read groups

SquirrelAssassin avatar Oct 16 '23 21:10 SquirrelAssassin