Skip to content

Export-MsIdAppConsentGrantReport - The module 'Microsoft.Graph.DirectoryObjects' with version '2.9.1' #73

Description

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)

  • Operating System: Windows 10
  • PowerShell Version: 7.4.5
  • MS Graph PowerShell SDK Module Version: [e.g. 1.6.2, 1.9.3, 2.0.0]

Additional context

Add any other context about the problem here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions