Run a tenant resource query
cs_admin_queryRun tenant-level resource queries using the admin center query language, then optionally save results as JSON, list, or CSV. Uses 'pac admin query' with the active authentication profile.
Instructions
Run a tenant-level resource query (the admin centre's own query language) and optionally write the results to a file as JSON, list or CSV. Runs 'pac admin query' 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_admin_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for pac (for project commands: the solution project folder) | |
| query | No | Resource query JSON as a string | |
| 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. | |
| queryFile | No | File containing the query JSON | |
| 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. | |
| outputFile | No | Where to save the results | |
| outputType | No | Json, List or Grid (default Grid) | |
| timeoutSeconds | No | Default 600 |