Install the Microsoft Graph command-line interface (CLI)

The Microsoft Graph command-line interface (CLI) is published on GitHub.


The Microsoft Graph command-line interface (CLI) is currently in preview. Use of this CLI in production is not supported.


  1. Download the .zip file beginning with msgraph-cli-win-x64 from the Assets section of the page.
  2. Extract the contents of the file into a directory.

Windows environment setup (Optional)

  1. Open Settings.

  2. Select About, then Advanced system settings.

  3. Select Environment Variables....

  4. Locate and select Path, then select Edit.


    The Path variable is present in User variables as well as System variables. Updating the variable in User variables will only update the current user's path. Updating the variable in System variables will update the path for all users on the computer.

  5. Add the full path to the directory containing mgc.exe.

Verify installation

After the installation is completed, you can verify the installed version with the following command.

mgc --version

The version in the output should match the latest version published on TBD. Now you're ready to use the SDK.

Updating the CLI

To update the CLI, download a newer version and extract into the directory containing the older version.

Uninstalling the CLI

Delete the files from their location.

Next steps

To learn how to perform basic tasks with the Microsoft Graph CLI, see Get started with the Microsoft Graph command-line interface (CLI).