Skip to main content

teams auth login

Auto-generated reference

This page is generated from checked-in CLI metadata for release v0.9.0. Do not edit it by hand.

Authenticate with Microsoft Teams

Synopsis​

teams auth login [OPTIONS]

Options​

OptionValueRequiredEnvDefaultDescription
--client-credentialsCLIENT_CREDENTIALSnofalseUse client credentials flow (non-interactive)
--device-codeDEVICE_CODEnofalseUse device code flow
--client-idCLIENT_IDnoAzure AD application (client) ID. Saved to the profile after a successful delegated login and reused by later logins. TEAMS_CLI_CLIENT_ID is used when this is absent, but is not saved
--client-secretCLIENT_SECRETnoTEAMS_CLI_CLIENT_SECRETAzure AD client secret. Prefer the environment variable: a value passed as a flag shows in process listings and shell history
--tenant-idTENANT_IDnoAzure AD tenant ID. Saved to the profile after a successful delegated login and reused by later logins. TEAMS_CLI_TENANT_ID is used when this is absent, but is not saved
--scopesSCOPESnoTEAMS_CLI_SCOPESOAuth scopes (space-separated, for delegated flows)

Examples​

Device code login​

teams auth login --device-code

Login with extra delegated scopes​

teams auth login --device-code --scopes "User.Read People.Read Files.Read.All offline_access"

Exit Codes​

CodeMeaning
0success
2invalid input
3authentication error
4permission denied
5not found
6rate limited

See Also​