You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
This Powershell project has a function which checks if commands/modules are installed.
This functions checks what Microsoft.Graph.Authentication is installed in the current powershell session. Using this Version it then checks for the same versioned sub modules.
$MgAuthenticationModuleVersion = Get-Command 'Connect-MgGraph' -Module 'Microsoft.Graph.Authentication' | Select-Object -ExpandProperty Version
It's likely you have a conflict in versions that has caused your issues. This checker could probably have a better error explaining this or linking to a guide to resolve your mg graph install.
Here's a quick example of how I replicated a similar mismatch.
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.
The text was updated successfully, but these errors were encountered: