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
| Option | Value | Required | Env | Default | Description |
|---|---|---|---|---|---|
--client-credentials | CLIENT_CREDENTIALS | no | false | Use client credentials flow (non-interactive) | |
--device-code | DEVICE_CODE | no | false | Use device code flow | |
--client-id | CLIENT_ID | no | Azure 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-secret | CLIENT_SECRET | no | TEAMS_CLI_CLIENT_SECRET | Azure AD client secret. Prefer the environment variable: a value passed as a flag shows in process listings and shell history | |
--tenant-id | TENANT_ID | no | Azure 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 | ||
--scopes | SCOPES | no | TEAMS_CLI_SCOPES | OAuth 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
| Code | Meaning |
|---|---|
| 0 | success |
| 2 | invalid input |
| 3 | authentication error |
| 4 | permission denied |
| 5 | not found |
| 6 | rate limited |