microsoftgraph / msgraph-cli-archived

The Microsoft Graph CLI repository has moved. This repository is now an archive.
https://github.com/microsoftgraph/msgraph-cli
Other
44 stars 9 forks source link

Task/homebrew formula #158

Closed jobala closed 3 years ago

jobala commented 3 years ago

Overview

This PR generates a homebrew formula used for installing the CLI with Homebrew in MacOS and Linux systems.

Demo

Run the following commands.

brew tap jobala/homebrew-graph
brew install msgraph-cli

Notes

In MacOs the mg command is used by the micrognu program. To run msgraph commands use graph instead of mg

The homebrew formula uses the msgraph-cli-core(read azure-cli-core) package from the test package index but instead of installing it directly it first downloads the package's .tar.gz file and installs it as a local package. This technique will install dependencies from the production index and avoids a security scenario where a dependency in the text index is compromised.

Testing Instructions

N/A

Fixes #152

Microsoft Reviewers: Open in CodeFlow
MIchaelMainer commented 3 years ago

Had to first install xcode-select before I could successfully install the CLI.

Error: python@3.8: the bottle needs the Apple Command Line Tools to be installed.
  You can install them, if desired, with:
    xcode-select --install

Used the user login: graph login -u user@tenant.onmicrosoft.com -p password

Made the following call: graph users user show-user --user-id michael@chambele.onmicrosoft.com

Then was prompted to access keychain. Strange that I had to enter credentials twice (didn't choose Always Allow) so I could recreate. image

Could successfully make the call to get the the user info.

Where did the new login options come from?

jobala commented 3 years ago

@MIchaelMainer the CLI has new login options because it is using azure-cli's profile command module, note that this installs CLI based off the beta branch.