dv-admin
Skill: Environment Admin — Bulk Delete, Retention, Org Settings, OrgDB, Recycle Bin
⚠️ Critical safety rules — read first
- Bulk delete is irreversible and bypasses the recycle bin.
pac data bulk-delete schedulewithout--fetchxmldeletes every record in the table. Refuse to run until the user explicitly says ALL (or ALL RECORDS) and the entity logical name — e.g.,"yes, delete ALL records in contact". Bare"yes"rejected. Empty-filter FetchXML does NOT bypass this gate. See Bulk Delete Commands for the full rule and disambiguation flow.- Settings allowlist is hard. Only the 37 PPAC toggles in Allowed settings may be read or updated. Any other setting must be refused: "That setting is out of scope for dv-admin. Use the Power Platform admin center."
- Recycle bin disable is PATCH, never DELETE.
PATCH statecode=1, statuscode=2, isreadyforrecyclebin=false. DELETE enqueues async opt-out and orphans per-entity configs — seereferences/recycle-bin.md.- System tables warning. Unfiltered bulk delete on
systemuser,businessunit,organization, orrolebreaks the environment. Warn additionally before running.
Four mechanisms — pick based on where the setting lives:
| Mechanism | Use for | How |
|---|---|---|
PAC CLI (pac org update-settings / list-settings) |
Columns on the organization entity (audit, plugin trace, typeahead, quick find, canvas/flow solutions, email validation, audit retention) |
--name <column> --value <value> — accepts any org column, not just the legacy audit ones |
| Python SDK — OrgDB XML | Keys inside the orgdborgsettings XML blob (MCP, search, Fabric, Work IQ, TDS endpoint, attachment security, ownership, address records, block unmanaged, delete users, Excel AI) |
Read XML → parse → modify → PATCH whole blob back on organizations({id}) |
| Python SDK — recyclebinconfigs | Recycle bin on/off + retention days | CREATE/PATCH recyclebinconfigs entity record |
| Python SDK — settingdefinition + organizationsettings | App-level / plan-level security role toggles | Look up settingdefinition by uniquename → CREATE or PATCH organizationsettings row with value |
Do NOT write Python scripts for operations PAC CLI can handle. Do NOT mix mechanisms (e.g., don't hand-PATCH an org column that PAC CLI already covers).
More from microsoft/dataverse-skills
dv-connect
One-step setup for a Dataverse environment — installs tools, authenticates, registers the MCP server, and writes `.env`. Use when starting a new project, switching environments, fixing authentication, or troubleshooting an MCP connection that won't come up.
17dv-solution
Dataverse solution lifecycle — create, export, import, promote across environments, and validate deployments. Use when the user wants to package customizations, deploy to another environment, or move work between dev / test / prod.
16dv-overview
Tool routing and cross-cutting rules for Dataverse work — which skill applies to which task, environment-confirmation, and pull-to-repo. Use when the user mentions Dataverse, Dynamics 365, Power Platform, or CRM; this skill picks the specialist (dv-connect / dv-data / dv-metadata / dv-query / dv-solution / dv-admin / dv-security) for the request.
15dv-metadata
Dataverse schema authoring via the Python SDK and Web API — tables, columns, relationships, forms, and views. Use when the user wants to define or evolve the data model — add a column, create a table, set up a lookup, customize a form, or build a view.
15dv-data
Record-level CRUD and bulk operations via the Python SDK — create, update, delete, upsert, CSV import, multi-table foreign-key loads, AI-generated sample data. Use when the user wants to write, modify, seed, or import data records into Dataverse tables.
10dv-query
Bulk reads, multi-page iteration, and analytics over Dataverse data via the Python SDK and Web API. Use when the user wants to read, list, filter, aggregate, group, join, or analyze records — including pandas DataFrame workflows and notebook exploration.
10