authenticating-with-oauth
Installation
SKILL.md
Skill: AL OAuth Integration
Validation Gates
- After Step 4:
GetAccessToken()returns valid token in sandbox - After Step 5: API call succeeds, 401 triggers auto-retry
- Final: Token caching works (check
Token Expiryfield), telemetry logs operations
Note: SecretText.Unwrap() blocked in SaaS. Use Text + [NonDebuggable].
Procedure
Step 1: Identify OAuth Flow
Ask user:
- Is this service-to-service (no user context)? → Client Credentials
- Does it require user consent/context? → Authorization Code
Step 2: Create Setup Table
Create a setup table with these fields: