Skip to content

Commit

Permalink
bugfix, api permissions requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejs4 committed Nov 19, 2021
1 parent 226a083 commit b11accc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions INTUNE/Get-ClientIntunePolicyResult.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@
Default is "IntunePolicyReport.html" in user profile.
.PARAMETER getDataFromIntune
Switch for getting additional data (policy names and account name instead of ID) from Intune itself.
Switch for getting additional data (policy names and account names instead of IDs) from Intune itself.
Microsoft.Graph.Intune module is required!
Account with READ permission for: Applications, Scripts, RemediationScripts, Users will be needed!
Account with READ permission for: Applications, Scripts, RemediationScripts, Users will be needed i.e.:
- DeviceManagementApps.Read.All
- DeviceManagementManagedDevices.Read.All
- DeviceManagementConfiguration.Read.All
- User.Read.All
.PARAMETER credential
Credentials for connecting to Intune.
Expand Down Expand Up @@ -1115,12 +1119,12 @@

$lastUpdatedTimeUtc = Get-ItemPropertyValue $newestWin32AppRecord.PSPath -Name LastUpdatedTimeUtc
try {
$complianceStateMessage = Get-ItemPropertyValue "$($newestWin32AppRecord.PSPath)\ComplianceStateMessage" -Name ComplianceStateMessage | ConvertFrom-Json -ErrorAction Stop
$complianceStateMessage = Get-ItemPropertyValue "$($newestWin32AppRecord.PSPath)\ComplianceStateMessage" -Name ComplianceStateMessage -ErrorAction Stop | ConvertFrom-Json -ErrorAction Stop
} catch {
Write-Verbose "`tUnable to get Compliance State Message data"
}
try {
$enforcementStateMessage = Get-ItemPropertyValue "$($newestWin32AppRecord.PSPath)\EnforcementStateMessage" -Name EnforcementStateMessage | ConvertFrom-Json -ErrorAction Stop
$enforcementStateMessage = Get-ItemPropertyValue "$($newestWin32AppRecord.PSPath)\EnforcementStateMessage" -Name EnforcementStateMessage -ErrorAction Stop | ConvertFrom-Json -ErrorAction Stop
} catch {
Write-Verbose "`tUnable to get Enforcement State Message data"
}
Expand Down

0 comments on commit b11accc

Please sign in to comment.