Find-MgGraphCommand : URI is not valid

Find-MgGraphCommand : URI is not valid

In some cases you’ll be hit by the following error message:

Find-MgGraphCommand : URI ' https://graph.microsoft.com/v1.0/[some command]' in  is not valid or
  is not currently supported by the SDK. Ensure the URI is formatted correctly and try again.
At line:1 char:1
+ Find-MgGraphCommand [some command]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Find-MgGraphCommand

This error message occurs when you’re trying to execute the Find-MgGraphCommand.

Find-MgGraphCommand is a great command to identify important aspects of your Microsoft Graph PowerShell commands, e.g.:

  • What module holds this command?
  • What Scope (Permissions) are needed to run this command?

The error message is thrown because the Find-MgGraphCommand requires the “-Command” switch, like so:

PS C:\> Find-MgGraphCommand -Command Get-MgUser


   APIVersion: v1.0

Command    Module Method URI              OutputType           Permissions
-------    ------ ------ ---              ----------           -----------
Get-MgUser Users  GET    /users           IMicrosoftGraphUser1 {DeviceManagementApps.Read.All, DeviceManagem...
Get-MgUser Users  GET    /users/{user-id} IMicrosoftGraphUser1 {DeviceManagementApps.Read.All, DeviceManagem...


   APIVersion: beta

Command    Module Method URI              OutputType          Permissions
-------    ------ ------ ---              ----------          -----------
Get-MgUser Users  GET    /users/{user-id} IMicrosoftGraphUser {DeviceManagementApps.Read.All, DeviceManageme...
Get-MgUser Users  GET    /users           IMicrosoftGraphUser {DeviceManagementApps.Read.All, DeviceManageme...

Super Fast Administration Without PowerShell

If you’re tired of constantly googling PowerShell commands and just want the job done, you should try out Easy365Manager.

Easy365Manager is a snap-in to Active Directory Users & Computers that allows you to perform all daily Office 365 management directly from AD Users & Computers.

You can even manage settings that are only supported by PowerShell – like external forwarding and calendar permissions:

Download the trial right now to eliminate 50-75% of your Office 365 administration time.