sp_auth_begin
Initiates Microsoft Identity device code login for a SharePoint profile. Returns user code and verification URL; background polling continues until sign-in completes.
Instructions
Initiate Microsoft Identity Device Code login for profile (default 'default'). Non-blocking: returns within ~1s with user_code + verification_url. A background task continues to poll Microsoft Identity and writes the token on success — the agent should poll sp_auth_status until status is 'signed_in', or until the user completes / cancels the flow.
Idempotency: if a pending session already exists for this profile, the existing session is returned unchanged unless force=True (which cancels and restarts).
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://login.microsoftonline.com/...Rationale: 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 |
|---|---|---|---|
| force | No | ||
| profile | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||