teams auth login
Auto-generated reference
This page is generated from checked-in CLI metadata for release v0.3.0. Do not edit it by hand.
Authenticate with Microsoft Teams.
Synopsis
teams auth login [--device-code] [--client-id ID] [--tenant-id ID] [--scopes SCOPES]
Options
| Option | Value | Required | Env | Default | Description |
|---|---|---|---|---|---|
--client-credentials | no | Use client credentials flow (non-interactive) | |||
--device-code | no | Use device code flow | |||
--client-id | CLIENT_ID | no | TEAMS_CLI_CLIENT_ID | Azure AD application (client) ID | |
--client-secret | CLIENT_SECRET | no | TEAMS_CLI_CLIENT_SECRET | Azure AD client secret | |
--tenant-id | TENANT_ID | no | TEAMS_CLI_TENANT_ID | Azure AD tenant ID | |
--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 |