From a6627ee76352d4b87563223a2ae6445a28062abe Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Thu, 2 Jul 2026 00:55:17 +0000 Subject: [PATCH] Request department and staff scopes in Workforce connection test Co-Authored-By: Claude Sonnet 4.6 --- src/routes/integrations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/integrations.js b/src/routes/integrations.js index b271893..05cd12d 100644 --- a/src/routes/integrations.js +++ b/src/routes/integrations.js @@ -92,7 +92,7 @@ export async function integrationRoutes(app) { const res = await fetch(`${baseUrl}/api/oauth/token`, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - body: new URLSearchParams({ grant_type: 'password', username: creds.email, password: creds.password }).toString(), + body: new URLSearchParams({ grant_type: 'password', username: creds.email, password: creds.password, scope: 'me department staff' }).toString(), signal: AbortSignal.timeout(8000), }) if (!res.ok) throw new Error(`Workforce auth failed (${res.status})`)