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

Feat/integrate auth #146

Closed jobala closed 3 years ago

jobala commented 3 years ago

Overview

Integrates Azure CLI's auth module.

Demo

Command
    mg login : Log in to Microsoft Graph.

Arguments
    --allow-no-subscriptions : Support access tenants without subscriptions. It's uncommon but
                               useful to run tenant level commands, such as 'az ad'.
    --environment
    --password -p            : Credentials like user password, or for a service principal, provide
                               client secret or a pem file with key and public certificate. Will
                               prompt if not given.
    --scopes
    --service-principal      : The credential representing a service principal.
    --tenant -t              : The AAD tenant, must provide when using service principals.
    --tenant-access
    --use-cert-sn-issuer     : Used with a service principal configured with Subject Name and Issuer
                               Authentication in order to support automatic certificate rolls.
    --use-device-code        : Use CLI's old authentication flow based on device code. CLI will also
                               use this if it can't launch a browser in your behalf, e.g. in remote
                               SSH or Cloud Shell.
    --username -u            : User name, service principal, or managed service identity ID.

Managed Service Identity Arguments
    --identity -i            : Log in using the Virtual Machine's identity.

Notes

N/A

Testing Instructions

Fixes #133

Microsoft Reviewers: Open in CodeFlow