Create a service-principal Dataverse connection
cs_create_connectionCreate a Dataverse connection using an app registration (application ID and client secret) so pipeline-owned flows and tools run without a personal account. Requires confirm: true for live changes.
Instructions
Create a Dataverse connection that authenticates with an app registration (application id + client secret) so flows and tools owned by a pipeline do not depend on a person. This is the only connection kind pac can create; connector connections (SharePoint, Outlook, MCP servers ...) are still authorised in the portal. Runs 'pac connection create' with the active pac auth profile. Mutates a live environment: requires confirm: true (a dry run otherwise).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tenantId": "<tenantId>",
"name": "<name>",
"applicationId": "<applicationId>",
"clientSecret": "<clientSecret>"
},
"name": "cs_create_connection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for pac (for project commands: the solution project folder) | |
| name | Yes | Connection display name | |
| confirm | No | Required to actually perform a change in a live environment. Without it the tool returns a dry run. | |
| profile | No | pac auth profile to run as: the admin account for tenant commands. Defaults to CPS_ADMIN_PROFILE for admin commands and CPS_PAC_PROFILE otherwise, then the active profile. cs_init lists the profiles. | |
| tenantId | Yes | Entra tenant id | |
| background | No | Run in the background and return a jobId immediately, for a command that takes longer than the client will wait. Poll cs_job_status. | |
| environment | No | Environment id or URL; default: the environment of the active pac auth profile | |
| clientSecret | Yes | Client secret; prefer a secret from a vault, it is masked in logs (masked in logs and results) | |
| applicationId | Yes | App registration (client) id | |
| timeoutSeconds | No | Default 600 |