From copilot-studio
Sends 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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/copilot-studio:chat-sdk <utterance><utterance>copilot-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
Send a single utterance to a published agent via the Copilot Studio Client SDK. Use this for agents with **integrated authentication / Entra ID SSO** (authenticationmode 2).
Send a single utterance to a published agent via the Copilot Studio Client SDK. Use this for agents with integrated authentication / Entra ID SSO (authenticationmode 2).
Requires prior authentication via /copilot-studio:test-auth. Do NOT ask the user for a client ID yourself — the test-auth skill handles app registration setup and authentication.
Run the script with --client-id and the utterance from $ARGUMENTS:
node ${CLAUDE_SKILL_DIR}/../../scripts/chat-with-agent.bundle.js \
--client-id "<clientId>" "<utterance>" [--agent-dir <path>]
Authentication: Requires prior authentication via /copilot-studio:test-auth. The token is cached in the "test-agent" slot and shared with the eval API. If auth fails or the SDK hangs, tell the caller to re-run test-auth.
Parse the JSON output from stdout:
{
"status": "ok",
"protocol": "m365",
"utterance": "hello",
"conversation_id": "abc123-...",
"start_activities": [ ... ],
"activities": [ ... ]
}
Display the agent's response from the activities array:
type === "message" — show textsuggestedActions.actions arrayattachments with contentType === "application/vnd.microsoft.card.adaptive"Save conversation_id for follow-ups.
Pass --conversation-id from the previous response:
node ${CLAUDE_SKILL_DIR}/../../scripts/chat-with-agent.bundle.js \
--client-id "<id>" "<follow-up>" --conversation-id "<id>"
SDK sessions do not expire as quickly as DirectLine. Reuse conversation_id automatically for follow-ups.
| Error | Cause | Resolution |
|---|---|---|
Authentication failed | Wrong client ID or tenant | Verify app registration and permissions |
Could not obtain conversation_id | Agent not published or wrong config | Verify agent is published |
npx claudepluginhub microsoft/skills-for-copilot-studio --plugin copilot-studioBuilds Python agents for Microsoft 365, Teams, and Copilot Studio with aiohttp hosting, AgentApplication routing, streaming, and MSAL auth.
Sends utterances to Copilot Studio agents via DirectLine v3 REST API. Handles no-auth/manual-auth agents, multi-turn conversations, sign-in flows, and token/conversation management.
Builds multichannel Python agents for Teams, M365, Copilot Studio using aiohttp hosting, AgentApplication routing, streaming responses, and MSAL auth.