Create a pac auth profile
cs_create_auth_profileCreates a pac auth profile for Copilot Studio to authenticate via service principal, certificate, managed identity, federation, or browser sign-in.
Instructions
Create a pac authentication profile. Non-interactive: service principal (applicationId + clientSecret + tenant), certificate, managed identity, or GitHub / Azure DevOps federation. Interactive (a person signing in, which is the usual way to add an admin account): pass name, environment and background: true - pac opens its own browser, the call returns a jobId at once, and cs_job_status reports when the profile exists. Without background this blocks until the sign-in finishes and the client will usually give up first. Device code needs a terminal: this server gives pac no stdin. Runs 'pac auth create' with the active pac auth profile.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "cs_create_auth_profile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for pac (for project commands: the solution project folder) | |
| name | No | Profile name (max 30 characters) | |
| cloud | No | Cloud instance (Public, UsGov, UsGovHigh, UsGovDod, China) | |
| tenant | No | Tenant id (required with applicationId) | |
| 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. | |
| password | No | Password (masked in logs) (masked in logs and results) | |
| username | No | User name for username/password auth (not recommended) | |
| background | No | Run in the background and return a jobId immediately. Use this for interactive sign-in: pac opens a browser and waits, which would otherwise outlive the client's call timeout. Poll cs_job_status. | |
| deviceCode | No | Use the device-code flow for interactive sign-in (blocks until done) | |
| environment | No | Default environment for the profile (id, URL, unique or partial name) | |
| clientSecret | No | Client secret (masked in logs) (masked in logs and results) | |
| applicationId | No | App registration (client) id | |
| timeoutSeconds | No | Default 600 | |
| githubFederated | No | GitHub federated credential (needs tenant and applicationId) | |
| managedIdentity | No | Use the default Azure identity | |
| certificateDiskPath | No | Certificate file for certificate auth | |
| certificatePassword | No | Certificate password (masked in logs) (masked in logs and results) | |
| azureDevOpsFederated | No | Azure DevOps federated credential (needs tenant and applicationId) |