MSIdentityTools icon indicating copy to clipboard operation
MSIdentityTools copied to clipboard

Get-MsIdInactiveSignInUser fails to "Find-MgGraphCommand: 'Get-MgUser'"

Open matthewjlevy opened this issue 1 year ago • 3 comments

Describe the bug

When Running the command "Get-MsIdInactiveSignInUser -LastSignInBeforeDaysAgo 60 -UserType Guest the function can't find the Get-MgUser command.

To Reproduce

I have installed the latest version (2.0.52) of MsIdentityTools and Microsoft.Graph.Users version 2.12.0 get-command get-MgUser

CommandType Name Version Source


Function Get-MgUser 2.12.0 Microsoft.Graph.Users

Steps to reproduce: Run connect-MgGraph -Scopes "Application.Read.all","Directory.Read.All","User.Read.All"copes. Run Get-MsIdInactiveSignInUser -LastSignInBeforeDaysAgo 60 -UserType Guest

Expected behavior

Output of Inactive Guest Users

Screenshots

image

Environment (please complete the following information)

  • Operating System: Windows 11
  • PowerShell Version: PowerShell 7.3.11 ]
  • MS Graph PowerShell SDK Module Version: 2.12.0

matthewjlevy avatar Feb 06 '24 16:02 matthewjlevy

Same here, i tracked down the issue and created a Pull Request https://github.com/AzureAD/MSIdentityTools/pull/40

BohrenAn avatar Feb 08 '24 07:02 BohrenAn

By the way the way, the Error: "is not a valid Microsoft Graph PowerShell command" happens at multiple commands

  • Get-MsIdGroupWithExpiration
  • Get-MsIdInactiveSignInUser -LastSignInBeforeDaysAgo 30 image

@merill Can you please review the Pull Request?

Regards Andres

BohrenAn avatar Feb 08 '24 22:02 BohrenAn

Also Bugreport has been created in MSGraph-SDK-PowerShell to solve the root issue https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2582

BohrenAn avatar Feb 10 '24 11:02 BohrenAn

This Issue has been fixed with Version 2.0.57. Issue can be closed now

BohrenAn avatar May 26 '24 13:05 BohrenAn

Thank you Andres, I will check it out


From: Andres Bohren @.> Sent: Sunday, May 26, 2024 3:31 PM To: AzureAD/MSIdentityTools @.> Cc: Matthew Levy @.>; Author @.> Subject: Re: [AzureAD/MSIdentityTools] Get-MsIdInactiveSignInUser fails to "Find-MgGraphCommand: 'Get-MgUser'" (Issue #47)

This Issue has been fixed with Version 2.0.57. Issue can be closed now

— Reply to this email directly, view it on GitHubhttps://github.com/AzureAD/MSIdentityTools/issues/47#issuecomment-2132225511, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGVS2T4W4YB43TGLGN5WW4LZEHP4FAVCNFSM6AAAAABC4I5BV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZSGIZDKNJRGE. You are receiving this because you authored the thread.Message ID: @.***>

matthewjlevy avatar May 26 '24 13:05 matthewjlevy