# Add Mcscopilot

Adds Microsoft Copilot Studio connector to a Power Apps code app.

- Repository: https://github.com/microsoft/power-platform-skills (1098 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add microsoft/power-platform-skills --skill add-mcscopilot -g -a claude-code -y`
Codex: `npx skills add microsoft/power-platform-skills --skill add-mcscopilot -g -a codex -y`
Cursor: `npx skills add microsoft/power-platform-skills --skill add-mcscopilot -g -a cursor -y`
Gemini CLI: `npx skills add microsoft/power-platform-skills --skill add-mcscopilot -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add microsoft/power-platform-skills`

## Description

Adds Microsoft Copilot Studio connector to a Power Apps code app. Use when invoking Copilot Studio agents, sending prompts to agents, or integrating agent responses.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

**📋 Shared Instructions: [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md)** - Cross-cutting concerns.

# Add Microsoft Copilot Studio

## Workflow

1. Check Memory Bank → 2. Add Connector → 3. Configure → 4. Build → 5. Update Memory Bank

---

### Step 1: Check Memory Bank

Check for `memory-bank.md` per [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md).

### Step 2: Add Connector

**First, find the connection ID** (see [connector-reference.md](${PLUGIN_ROOT}/shared/connector-reference.md)):

Run the `/list-connections` skill. Find the Microsoft Copilot Studio connection in the output. If none exists, direct the user to create one using the environment-specific Connections URL, construct it from the active environment ID in context (from `power.config.json` or a prior step): `https://make.powerapps.com/environments/<environment-id>/connections` → **+ New connection** → search for the connector → Create.

```bash
pa app add data-source --connector microsoftcopilotstudio -c <connection-id>
```

### Step 3: Configure

Ask the user which Copilot Studio agent they want to invoke and what operations they need.

**Agent Setup Prerequisites** (manual steps the user must complete in Copilot Studio):

1. **Publish the agent**: In Copilot Studio, click Channels → select Teams → add to Teams → click Publish.
2. **Get the agent name**: Under Channels, click "Web app". The connection string URL contains the agent name. Example: `https://...api.powerplatform.com/copilotstudio/dataverse-backed/authenticated/bots/cr3e1_myAgent/conversations?...`, the agent name is `cr3e1_myAgent`.

**ExecuteCopilotAsyncV2** -- execute an agent and wait for the response:

Use the `ExecuteCopilotAsyncV2` operation (path: `/proactivecopilot/executeAsyncV2`). This is the **only** endpoint that reliably returns agent responses synchronously. It is the same endpoint used by Power Automate's "Execute Agent and wait" action.

The rest: https://github.com/microsoft/power-platform-skills/blob/HEAD/plugins/code-apps/skills/add-mcscopilot/SKILL.md
