teams_login
Sign in to Microsoft Teams using a device code for personal or work/school accounts, returning a URL and short code to complete authentication on any device.
Instructions
Sign in to Microsoft Teams with a device code (no browser automation, no app registration), for personal accounts (Teams free: Outlook/Hotmail/Live) and work/school accounts. Returns a URL and a short code for the user to enter on any device; work accounts can then add Microsoft Graph access with graph=true (and graph_admin=true for admin-approved team management).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"account_type": "<account_type>"
},
"name": "teams_login"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alias | No | Name to save the account under (default: the email address). | |
| graph | No | Work accounts: add Microsoft Graph access to an already signed-in account, with permissions users can grant themselves. | |
| tenant | No | Work accounts only: tenant domain or id (e.g. contoso.onmicrosoft.com). Needed for guest access to another organisation; a guest account is saved separately, as email#tenant. | |
| account | No | Account alias (see teams_accounts). Defaults to the default account. | |
| graph_admin | No | Work accounts, implies graph: also ask for the Graph permissions a tenant admin must approve (team/channel members and settings, tabs, tags, apps, channel messages, transcripts). | |
| account_type | Yes | "personal" for Teams free / Microsoft account, "work" for work or school (Entra ID). |