From copilot-studio
Authenticates with Power Platform API for Copilot Studio evaluation and SDK chat workflows. Caches shared token for run-eval and chat-sdk skills. Requires App Registration setup.
How this skill is triggered — by the user, by Claude, or both
Slash command
/copilot-studio:test-authcopilot-studio-testThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Authenticate with the Power Platform API for evaluation and SDK chat workflows.
Authenticate with the Power Platform API for evaluation and SDK chat workflows.
This caches a token in the "test-agent" slot that is shared by run-eval and chat-sdk.
Locate the agent workspace (directory containing .mcs/conn.json):
Glob: **/agent.mcs.yml
The conn.json provides the tenant ID automatically — no need to ask the user for it.
CRITICAL: You MUST present the FULL configuration checklist below when asking for the client ID. Do NOT omit any items — users frequently miss the redirect URI and public client settings, which causes auth failures.
Ask the user for their App Registration Client ID and show them all of the following requirements in your message:
What is your App Registration Client ID for the Evaluation API?
Before sharing it, please verify your App Registration has all of these settings:
- Redirect URI: Under Authentication > Mobile and desktop applications > redirect URI set to
http://localhost- Public client: Under Authentication > Advanced settings > Allow public client flows set to Yes
- API permissions: Under API permissions, these delegated permissions on the Power Platform API:
CopilotStudio.MakerOperations.Read(list test sets, get results)CopilotStudio.MakerOperations.ReadWrite(start evaluation runs)CopilotStudio.Copilots.Invoke(SDK chat — send utterances to the agent)- Admin consent: Granted for the tenant (green checkmarks in the API permissions list)
Missing any of these will cause authentication to fail.
If the user doesn't have one, guide them:
How to create an App Registration:
- Go to Azure Portal > App Registrations
- Click New registration, name it (e.g., "Copilot Studio Eval")
- Under API permissions > Add a permission > APIs my organization uses > search Power Platform API
- Select Delegated permissions and add:
CopilotStudio.MakerOperations.ReadCopilotStudio.MakerOperations.ReadWriteCopilotStudio.Copilots.Invoke- Click Grant admin consent for the tenant
- Under Authentication > Add a platform > Mobile and desktop applications > set redirect URI to
http://localhost- Still in Authentication, scroll to Advanced settings and set Allow public client flows to Yes (required — without this the interactive browser login will fail with an AADSTS error)
- Copy the Application (client) ID from the Overview page
Run the auth command (opens a browser — no device code needed):
node ${CLAUDE_SKILL_DIR}/../../scripts/eval-api.bundle.js auth --workspace <path> --client-id <id>
If successful, you'll see:
{"status": "ok", "message": "Authentication successful. Token cached for subsequent commands."}
Return the client ID and workspace path to the caller — they need these for subsequent run-eval and chat-sdk calls.
conn.json > AccountInfo.TenantId).~/.copilot-studio-cli/test-agent.cache.jsonsecurity delete-generic-password -s "copilot-studio-cli" -a "test-agent" to clear the macOS Keychain entrynpx claudepluginhub microsoft/skills-for-copilot-studio --plugin copilot-studioSends utterances to Copilot Studio agents via M365 Client SDK with Entra ID SSO. Supports multi-turn chats using conversation IDs; requires app registration client ID and prior authentication.
Builds Python agents for Microsoft 365, Teams, and Copilot Studio with aiohttp hosting, AgentApplication routing, streaming, and MSAL auth.
Builds multichannel enterprise agents for Microsoft 365, Teams, and Copilot Studio using the Microsoft Agents SDK with aiohttp hosting, AgentApplication routing, streaming responses, and MSAL-based authentication.