Download the .zip file beginning with msgraph-cli-win-x64 from the Assets section of the GitHub Releases page.
Extract the contents of the file into a directory.
Windows environment setup (Optional)
Open Settings.
Select About, then Advanced system settings.
Select Environment Variables....
Locate and select Path, then select Edit.
Note
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.
Download the .tar.gz file beginning with msgraph-cli-linux-x64 from the Assets section of the GitHub Releases page.
Extract the contents of the file into a directory.
Linux environment setup
To update PATH for your current session, run the following command while in the directory containing mgc.
export PATH=$PATH:$(PWD)
Alternatively, you can update PATH permanently by editing your shell profile (~/.bash-profile or ~/.zsh-profile). Add the following line to your profile.
export PATH=$PATH:[path-to-the-cli-folder]
Configure gnome-keyring
The following steps are required on Linux distributions that do not have a desktop environment.
Install gnome-keyring and libsecret with the following command.
The previous commands must be run every time the system restarts.
Download the .tar.gz file beginning with msgraph-cli-osx-x64 (for Intel-based Mac) or msgraph-cli-osx-arm (for M1 or M2-based Mac) from the Assets section of the GitHub Releases page.
Extract the contents of the file into a directory.
macOS environment setup
To update PATH for your current session, run the following command while in the directory containing mgc.
export PATH=$PATH:$(PWD)
Alternatively, you can update PATH permanently by editing your shell profile (~/.bash-profile or ~/.zsh-profile). Add the following line to your profile.
export PATH=$PATH:[path-to-the-cli-folder]
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.