Start signing in to Microsoft 365
auth_begin_loginStarts OAuth 2.0 browser sign-in to Microsoft 365, returns immediately, and opens the system browser for the user. Call it when a tool reports no session or missing consent, then check status.
Instructions
Starts OAuth 2.0 browser sign-in to Microsoft 365 using authorization code + PKCE. The system browser opens on this machine and the tool returns immediately while the user signs in there; call auth_login_status afterward to see whether they finished. Calling it again while a sign-in is pending reuses the same attempt instead of opening another browser window. Use it when a tool reports that there is no session, and again with scopes when a tool reports missing consent: sign-in is incremental, so a bare call asks only for the minimal set and each repeat consents to just what was added. Pass mode: "full" to consent up front to the rest instead, minus what an ordinary user cannot grant. Never ask the user to paste credentials or an authorization code into the conversation. No token is ever returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | How much to consent to. Omit it (or pass "bare") for the minimal sign-in set plus `scopes`. Pass "full" to consent up front to everything this configuration may need except what an ordinary user cannot grant on their own: admin-consent and tenant-policy-blocked scopes are left out rather than failing the whole prompt. | |
| scopes | No | Delegated scopes to consent to on top of the minimal sign-in set, e.g. ["Mail.Read"]. Omit it for the minimal set alone. When a tool fails for missing consent, pass the scopes its error names: Entra prompts only for what was added. |