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
Run ./mg login --scopes mail.read to login in and consent to the specified scopes
Overview
Integrates Azure CLI's auth module.
Demo
Notes
N/A
Testing Instructions
./mg login --scopes mail.read
to login in and consent to the specified scopes./mg login
to login with defaut scopesFixes #133
Microsoft Reviewers: Open in CodeFlow