sp_auth_status
Check SharePoint authentication status. Returns signed-in, pending device code, or no token state, enabling the agent to proceed, wait, or start login.
Instructions
Return the current sign-in state for profile (default 'default'). Three states the agent can act on directly:
'signed_in' — valid token on disk (regardless of how it got there: CLI login, prior tool-flow, or just refreshed silently). signed_in_user_upn populated. The agent can proceed.
'pending' — Device Code flow in progress. user_code, verification_url, time_remaining_s populated.
'none' — no token, no flow. Agent should call sp_auth_begin.
Recently-terminal sessions (expired / failed / cancelled) surface their error via the error field instead of falling back to 'none' — so the agent can render a specific failure message.
AGENT_INSTRUCTIONS: When status='pending', 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. Same format as sp_auth_begin.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||