Skip to content
Back to skills

Add Connector

ASecurity

Use when adding a Power Platform connector to an Expo/React Native Power Apps mobile app and no dedicated mobile connector skill exists.

  • 969 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 3, 2026
developmenttypescriptgobashsqlreactnodeazureapidatabasedevops

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned October 7, 2026

npx -y skills add microsoft/power-platform-skills --skill add-connector --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Add Connector?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Add Connector
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/microsoft-add-connector-power-platform-skills/badge)](https://www.skillsdirectory.com/skills/microsoft-add-connector-power-platform-skills)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: add-connector
description: Use when adding a Power Platform connector to an Expo/React Native Power Apps mobile app and no dedicated mobile connector skill exists.
user-invocable: true
allowed-tools: Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion, Skill
model: sonnet
---

> **Plugin check**: Run `node "${PLUGIN_ROOT}/scripts/check-version.js"` - if it outputs a message, show it to the user before proceeding.

**πŸ“‹ Shared instructions: [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md)** | **Connector reference: [connector-reference.md](${PLUGIN_ROOT}/shared/connector-reference.md)** β€” read both first.

# Add Connector (Generic)

Fallback skill for any connector not covered by a dedicated `/add-*` skill. For common connectors, prefer the dedicated skills:

- `/add-dataverse` β€” Dataverse tables
- `/add-sharepoint` β€” SharePoint Online

(More dedicated skills will land in v1: `/add-teams`, `/add-excel`, `/add-onedrive`, `/add-azuredevops`, `/add-office365`.)

The native host runtime (`@microsoft/power-apps-native-host`) handles connector routing, connection resolution, and OAuth consent through `PowerAppsProvider` in `app/_layout.tsx` β€” no separate executor wiring is needed.

## Workflow

1. Check Memory Bank β†’ 2. Identify Connector β†’ 3. Add Connector β†’ 4. Inspect & Configure β†’ 5. Build β†’ 6. Update Memory Bank

---

### Step 1 β€” Check Memory Bank

**Telemetry checkpoint: `validate_connector_project`**

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

Also confirm we're inside a Power Apps mobile app:

```bash
test -f power.config.json && test -f app.config.js
```

If either is missing, instruct the user to run `/create-mobile-app` first and stop.

### Step 2 β€” Identify Connector

**Telemetry checkpoint: `resolve_connector_request`**

**If `$ARGUMENTS` is provided or the caller already specified the connector**, use it directly and skip the question below.

Otherwise, ask the user which connector they want to add. Browse available connectors: [Connector Reference](https://learn.microsoft.com/en-us/connectors/connector-reference/).

**Before proceeding, check if the connector has a dedicated skill. If it does, delegate immediately and STOP:**

| Connector API name      | Delegate to        |
| ----------------------- | ------------------ |
| `sharepointonline`      | `/add-sharepoint`  |
| `commondataservice`     | `/add-dataverse`   |

Invoke the appropriate skill with the same `$ARGUMENTS` and **do not continue this skill's workflow**.

Common connector API names:

- `sharepointonline`, `teams`, `excelonlinebusiness`, `onedriveforbusiness`
- `azuredevops`, `azureblob`, `azurequeues`
- `office365`, `office365users`, `office365groups`
- `sql`, `commondataservice`

**Cloud flows are supported by the Power Apps CLI, but they are not connector data sources.** If the user wants to invoke an existing Power Automate cloud flow from the app, use the flow-specific commands instead of `pa app add data-source`:

```bash
$PA app list-flows --search '<flow-name-or-keyword>' --json
$PA app add flow --flow-id <flow-guid> --non-interactive
```

To remove a flow later (only when the user asks; `pa` needs `--force` for a non-interactive removal):

```bash
$PA app remove flow --flow-id <flow-guid> --force --non-interactive
```

After `pa app add flow`, continue at Step 4 and inspect the generated service/model files the same way as connector data sources.

### Step 3 β€” Add Connector

**Telemetry checkpoint: `generate_connector_data_source`**

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

Run the `/list-connections` skill with the connector API ID (for example `shared_office365users`). Capture the exact `connectionId` from `pa connection create`, or the `connectionRef` from `pa connection list-references` if the caller is solution-aware. If creation cannot complete in the CLI, 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` `environmentId` or a prior step):
`https://make.powerapps.com/environments/<environment-id>/connections` β†’ **+ New connection** β†’ search for the connector β†’ Create.

**Classify the connector before running `pa app add data-source`:**

| Connector shape | Examples | Required discovery | Add command |
| --- | --- | --- | --- |
| Action-style connector | Teams, Office 365 Users, Outlook, Azure DevOps | None after connection lookup | `$PA app add data-source --connector <apiId> --connection-id <connectionId>` |
| Table-based connector | Excel Online, OneDrive for Business, Azure Blob, SQL, SharePoint if not delegated | `connection list-datasets`, then `connection list-tables` | `$PA app add data-source --connector <apiId> --connection-id <connectionId> --dataset '<dataset>' --table '<table>'` |
| SQL stored procedure | SQL Server | `connection list-datasets`, then `connection list-procedures` if needed | `$PA app add data-source --connector shared_sql --connection-id <connectionId> --dataset '<database>' --procedure '<procedure>'` |

**For action-style connectors, print before starting:**
> "β†’ Running `pa app add data-source` for <connector>. ~10–30 seconds (writes generated services + connector schemas)."

Then run:

```bash
$PA app add data-source --connector <apiId> --connection-id <connectionId>
```

**For table-based connectors, discover datasets and tables first:**

```bash
$PA connection list-datasets --connector <apiId> --connection-id <connectionId> --json
$PA connection list-tables --connector <apiId> --connection-id <connectionId> --dataset '<dataset>' --json
```

Present the datasets/tables to the user if they did not specify them. Add one data source per selected table:

```bash
$PA app add data-source --connector <apiId> --connection-id <connectionId> --dataset '<dataset>' --table '<table>'
```

**For SQL stored procedures, discover procedures only when the user asks to invoke a stored procedure rather than a table:**

```bash
$PA connection list-procedures --connection-id <connectionId> --dataset '<database>' --json
$PA app add data-source --connector shared_sql --connection-id <connectionId> --dataset '<database>' --procedure '<procedure>'
```

**For Dataverse actions/functions rather than tables, discovery is available but this plugin only adds Dataverse table CRUD:**

```bash
$PA app find-dataverse-api --search '<operation-name>' --json
```

Surface the matching operation metadata and STOP with a clear note that this plugin can add Dataverse table CRUD through `/add-dataverse`, but does not add Dataverse actions/functions.

If the user actually needs Dataverse table CRUD, stop and delegate to `/add-dataverse`; do not add Dataverse tables from this generic connector skill.

**Parameter reference:**

- `--connector` β€” connector API ID (often `shared_<connector>`, e.g., `shared_office365users`). Use the exact value provided by the caller or connector docs.
- `--connection-id` / `-c` β€” required for non-Dataverse connectors unless using `--connection-ref`. Get from `pa connection create`, the maker portal, or caller context.
- `--connection-ref` β€” optional connection reference name when adding into a solution-aware app.
- `--dataset` / `-d` β€” required for table-based datasources (for example SharePoint site URL, Excel file/location, SQL database).
- `--table` β€” table/list/resource name for table-based datasources.
- `--procedure` β€” SQL stored procedure name when adding a stored procedure instead of a table.
- `--non-interactive` β€” use only on commands whose required options are fully supplied and whose implementation supports non-interactive omission of optional prompts. Do not add `--environment-id` to app-root verbs once `power.config.json` exists.
- `--solution-id` / `-s` β€” optional solution identifier when the data source should be added to a specific solution.

### Step 4 β€” Inspect & Configure

After adding, inspect the generated files. **Generated service files can be very large** β€” use `Grep` to find specific methods instead of reading the entire file:

```
Grep pattern="async \w+" path="src/generated/services/<Connector>Service.ts"
```

Files to check:

- `src/generated/services/<Connector>Service.ts` β€” available operations and their parameters
- `src/generated/models/<Connector>Model.ts` β€” TypeScript interfaces (if generated)
- `.power/schemas/<connector>/` β€” connector schema and configuration

For each method the user needs:

1. Grep for the method name to find its signature
2. Read just that method's section (use `offset` and `limit` parameters on Read)
3. Identify required vs optional parameters and response type

Help the user write code using the generated service methods.

### Step 5 β€” Build

**Telemetry checkpoint: `validate_connector_integration`**

**Print before starting:**
> "β†’ Regenerating connector schemas + running tsc to verify the new connector wires in cleanly (~10–20 seconds)."

`pa app add data-source` (Step 3) wrote new files into `.power/schemas/<connector>/`. The `connectorSchemas.ts` consumed by `app/_layout.tsx` is now stale β€” regenerate it before type-checking so the new connector is wired into the runtime schema map:

```bash
npm run generate-schemas
npx --no-install tsc --noEmit
```

Fix TypeScript errors before proceeding. Common gotcha: the new generated service may import a peer dependency you don't have installed yet β€” if so, `npx --no-install expo install <missing-package>` (NOT plain `npm install`, so versions stay Expo-compatible).

Do NOT deploy yet β€” that's `/deploy`'s job after all data sources are added.

### Step 6 β€” Update Memory Bank

Update `memory-bank.md` with: connector added, configured operations, build status.

## Remove a data source or flow

If the user asks to remove a connector/table/stored procedure that this skill added, use the matching Power Apps CLI command with explicit arguments. The user's request is the confirmation: `pa` refuses a non-interactive removal without `--force` (drop `--force` on `power-apps`-only projects β€” see [cli-binary.md](${PLUGIN_ROOT}/shared/cli-binary.md)):

```bash
$PA app remove data-source --connector <apiId> --name '<data-source-or-table-name>' --force --non-interactive
$PA app remove data-source --connector shared_sql --name '<procedure>' --procedure '<procedure>' --force --non-interactive
$PA app remove flow --flow-id <flow-guid> --force --non-interactive
```

Then run `npm run generate-schemas` and `npx --no-install tsc --noEmit` before reporting success.

## Runtime connector handling

The native host runtime handles all connector routing automatically via `PowerAppsProvider` in `app/_layout.tsx`. When a screen calls a generated service method:

1. `PowerAppsProvider` resolves the connection from `connectionReferences` in `power.config.json`
2. If the connection requires OAuth consent, `ConnectionSetupScreen` is shown automatically
3. `NativePowerAppsBridge` dispatches the call with the correct auth token

No separate executor or provider wiring is needed β€” Dataverse and non-Dataverse connectors use the same unified pipeline.

## Notes

- Generated files in `src/generated/` are produced directly by `pa app add data-source`. Differences in behavior come from runtime wiring in this mobile plugin.
- This skill never modifies `app.config.js` or `playerConfig.ts` β€” connector discovery is dynamic at runtime.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…