> Authenticate for Copilot Studio evaluation API and SDK chat. Caches a token that is shared across run-eval and chat-sdk skills. Run this before any eval or SDK chat workflow. Requires an App Registration with MakerOperations and Copilots.Invoke permissions.
npx skills add https://github.com/microsoft/skills-for-copilot-studio --skill test-auth
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:
>
> 1. Redirect URI: Under Authentication > Mobile and desktop applications > redirect URI set to http://localhost
> 2. Public client: Under Authentication > Advanced settings > Allow public client flows set to Yes
> 3. 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)
> 4. 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:
> 1. Go to Azure Portal > App Registrations
> 2. Click New registration, name it (e.g., "Copilot Studio Eval")
> 3. Under API permissions > Add a permission > APIs my organization uses > search Power Platform API
> 4. Select Delegated permissions and add:
> - CopilotStudio.MakerOperations.Read
> - CopilotStudio.MakerOperations.ReadWrite
> - CopilotStudio.Copilots.Invoke
> 5. Click Grant admin consent for the tenant
> 6. Under Authentication > Add a platform > Mobile and desktop applications > set redirect URI to http://localhost
> 7. 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)
> 8. 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 entryGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take microsoft/test-auth from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.