Lint auth code for retired patterns
pc_check_authIdentify deprecated Partner Center auth patterns (ADAL, graph.windows.net, etc.) and get severity, fixes, and doc links to resolve authentication failures.
Instructions
Scan a Partner Center auth or client code snippet for retired and deprecated patterns — the graph.windows.net token audience, ADAL, the archived .NET SDK, and the AzureAD/MSOnline PowerShell modules — and return the severity, explanation, fix, and doc link for each hit. Use this to triage existing code before or after a 401. For guidance on what to build instead, use pc_auth_guidance; to translate archived SDK calls into REST, use pc_migrate_from_sdk. Read-only, offline, deterministic pattern matching: the snippet is not executed, nothing is sent anywhere, and no code is modified. A clean snippet returns findings: [] with clean: true. Detection is regex-based, so a clean result is not a guarantee of correctness.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code to lint, pasted as-is. Any language — C#, TypeScript, PowerShell, or a raw token request URL. A partial snippet is fine: only the auth-related lines matter, and matching is case-insensitive. Secrets are matched against locally and never transmitted, but paste redacted code where you can. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when the call succeeded and `data` is populated; false when `error` explains why not. | |
| data | No | The result payload. Present only when `ok` is true. | |
| error | No | Human-readable reason the call failed. Present only when `ok` is false. |