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.
- Download the .zip file beginning with msgraph-cli-win-x64 from the Assets section of the page.
- Extract the contents of the file into a directory.
Windows environment setup (Optional)
Select About, then Advanced system settings.
Select Environment Variables....
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.
Add the full path to the directory containing mgc.exe.
After the installation is completed, you can verify the installed version with the following command.
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.
To learn how to perform basic tasks with the Microsoft Graph CLI, see Get started with the Microsoft Graph command-line interface (CLI).