Trying to use the command Export-MsIdAppConsentGrantReport to export report.
Getting error message in PS7 (PSVersion 7.4.5)
PS C:\UAT> Get-InstalledModule
Version Name Repository Description
2.24.0 Microsoft.Graph.Authentication PSGallery Microsoft Graph PowerShell Authentication Module.
2.24.0 Microsoft.Graph.DirectoryObjects PSGallery Microsoft Graph PowerShell Cmdlets
2.0.70 MSIdentityTools PSGallery Tools for managing, troubleshooting, and reporting on various aspects of Microsoft Identity products and se…
PS C:\UAT> Export-MsIdAppConsentGrantReport -ReportOutputType ExcelWorkbook -ExcelWorkbookPath C:\Delete\MFA\uat\UAT-App-Report.xlsx
Write-Error: The module 'Microsoft.Graph.DirectoryObjects' with version '2.9.1' not found. To resolve, try installing module 'Microsoft.Graph.DirectoryObjects' with version '2.9.1' to match currently
loaded modules. For example: Install-Module Microsoft.Graph.DirectoryObjects -RequiredVersion '2.9.1'
Write-Error: The module 'Microsoft.Graph.Applications' with version '2.9.1' not found. To resolve, try installing module 'Microsoft.Graph.Applications' with version '2.9.1' to match currently loaded
modules. For example: Install-Module Microsoft.Graph.Applications -RequiredVersion '2.9.1'
PS C:\UAT> $PSVersionTable
Name Value
PSVersion 7.4.5
PSEdition Core
GitCommitId 7.4.5
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Describe the bug
Trying to use the command Export-MsIdAppConsentGrantReport to export report. Getting error message in PS7 (PSVersion 7.4.5)
PS C:\UAT> Get-InstalledModule
Version Name Repository Description
2.24.0 Microsoft.Graph.Authentication PSGallery Microsoft Graph PowerShell Authentication Module. 2.24.0 Microsoft.Graph.DirectoryObjects PSGallery Microsoft Graph PowerShell Cmdlets 2.0.70 MSIdentityTools PSGallery Tools for managing, troubleshooting, and reporting on various aspects of Microsoft Identity products and se…
PS C:\UAT> Export-MsIdAppConsentGrantReport -ReportOutputType ExcelWorkbook -ExcelWorkbookPath C:\Delete\MFA\uat\UAT-App-Report.xlsx Write-Error: The module 'Microsoft.Graph.DirectoryObjects' with version '2.9.1' not found. To resolve, try installing module 'Microsoft.Graph.DirectoryObjects' with version '2.9.1' to match currently loaded modules. For example: Install-Module Microsoft.Graph.DirectoryObjects -RequiredVersion '2.9.1' Write-Error: The module 'Microsoft.Graph.Applications' with version '2.9.1' not found. To resolve, try installing module 'Microsoft.Graph.Applications' with version '2.9.1' to match currently loaded modules. For example: Install-Module Microsoft.Graph.Applications -RequiredVersion '2.9.1' PS C:\UAT> $PSVersionTable
Name Value
PSVersion 7.4.5 PSEdition Core GitCommitId 7.4.5 OS Microsoft Windows 10.0.19045 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
To Reproduce
Steps to reproduce the behavior: To run the report https://azuread.github.io/MSIdentityTools/commands/Export-MsIdAppConsentGrantReport#example-2
Install-Module ImportExcel PS > Connect-MgGraph -Scopes Directory.Read.All PS > Export-MsIdAppConsentGrantReport -ReportOutputType ExcelWorkbook -ExcelWorkbookPath .\report.xlsx
Expected behavior
Lists and categorizes privilege for delegated permissions (OAuth2PermissionGrants) and application permissions (AppRoleAssignments).
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information)
Additional context
Add any other context about the problem here.