tasks_login_begin
Starts the OAuth device code login process for accessing Microsoft Planner and To Do tasks. Returns a user code and verification URL for manual sign-in.
Instructions
Drive the OAuth Device Code flow as an MCP tool. Returns immediately, non-blocking. Surfaces user_code + verification_url so the agent can show them; polls Microsoft Identity in the background until the user completes sign-in OR the device code expires (~15 min cap). The agent then polls tasks_login_status until it flips to signed_in (or to a terminal expired / failed). REQUIRED parameter account_type: pass 'personal' for outlook.com / hotmail.com / live.com / msn.com (Microsoft To Do works; Planner does NOT — requires a work/school M365 group), or 'work_or_school' for any Microsoft 365 tenant account incl. B2B guests (both To Do and Planner work). The choice determines which Microsoft Device Code landing page the user is sent to (https://www.microsoft.com/link vs https://login.microsoft.com/device) — there is no auto-detection before sign-in. If you don't know, ASK THE USER first. Calling without account_type returns a structured error explicitly instructing you to elicit the choice. Idempotent: a non-expired pending session for the profile is returned as-is unless force=True. force=True cancels the in-flight session and starts a fresh flow. Returns the session's public view: session_id, user_code, verification_url, verification_url_complete, expires_at, time_remaining_s, status, signed_in_user_upn, error. AGENT_INSTRUCTIONS: Present the verification code to the user inside a fenced code block (so it can be copied with one click) and present the verification URL as a plain markdown link on its own line. Do not paraphrase, do not embed the code inside prose, do not wrap the URL in bold. Example:
Code:
```
ABCD-1234
```
Sign-in URL: https://www.microsoft.com/linkRationale: in a chat UI, a code inside a fenced block gets a one-click copy button; a bare URL becomes clickable; bold-wrapped links and inline codes do not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_type | No | ||
| force | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||