Manages Dataverse solution lifecycle using PAC CLI and Python SDK: create publisher and solution, add components, export/unpack, pack/import, and post-import validation. Use for promoting customizations between environments.
Ships in dataverse. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Create, export, unpack, pack, import, and validate Dataverse solutions. PAC CLI owns the file and transport operations; the Python SDK creates publisher and solution records and validates the result.
| Need | Use instead |
|---|---|
| Create tables, columns, relationships, forms, views | dataverse-metadata |
| Create, update, or delete records | dataverse-data |
| Query or read records | dataverse-query |
| Connect to Dataverse or set up MCP | dataverse-connect |
| Assign security roles | dataverse-security |
pac auth create) against the target environmentscripts/auth.py and .env in the project for SDK steps (set up by dataverse-connect)dataverse-overview, safe change lifecycle)SDK snippets below assume this client setup:
import os, sys
sys.path.insert(0, os.path.join(os.getcwd(), "scripts"))
from auth import get_client
client = get_client()
Publishers and solutions are ordinary Dataverse tables. Create them with client.records.create() / client.records.list() — not raw HTTP. The SDK handles auth, paging, and errors and avoids the URL-encoding, header, and GUID-parsing bugs that hand-rolled urllib introduces.
There is no
pac solution create. PAC handles export/import/pack/unpack, not solution record creation.
Every solution belongs to a publisher. Its customizationprefix (for example contoso, sa, lit) is prepended to every custom table, column, and relationship schema name and is effectively permanent — existing components keep it even if the publisher changes.
Never use the default new prefix. It carries no identity, risks collisions, and signals skipped best practice.
Always run discovery before creating a publisher:
publishers = client.records.list(
"publisher",
filter="customizationprefix ne 'none' and uniquename ne 'MicrosoftCorporation' and uniquename ne 'Microsoftdynamic'",
select=["publisherid", "uniquename", "friendlyname", "customizationprefix"],
top=10,
)
if publishers:
print("Existing publishers in this environment:")
for p in publishers:
print(f" {p['uniquename']} (prefix: {p['customizationprefix']}_)")
# ASK THE USER which publisher to use, e.g. "Reuse '<name>' (prefix: <prefix>_)?"
publisher_id = publishers[0]["publisherid"] # only after the user confirms
else:
# ASK THE USER for a prefix (2-8 lowercase chars, e.g. 'contoso')
publisher_id = client.records.create("publisher", {
"uniquename": "<publisheruniquename>",
"friendlyname": "<Publisher Display Name>",
"customizationprefix": "<prefix>", # from the user, never 'new'
"description": "<description>",
})
solution_id = client.records.create("solution", {
"uniquename": "<UniqueName>",
"friendlyname": "<Display Name>",
"version": "1.0.0.0",
"[email protected]": "/publishers(<publisher_guid>)",
})
print(f"Created solution: {solution_id}")
| Field | Value |
|---|---|
uniquename | <UniqueName> (no spaces) |
friendlyname | <Display Name> |
version | 1.0.0.0 |
publisherid | Publisher GUID from step 1, bound via [email protected] |
pac solution add-solution-component \
--solutionUniqueName <UniqueName> \
--component <ComponentSchemaName> \
--componentType <TypeCode> \
--environment <url>
PAC uses camelCase arguments here (--solutionUniqueName, --componentType), not kebab-case. Repeat per component.
| Type code | Component |
|---|---|
| 1 | Entity (table) |
| 2 | Attribute (column) |
| 26 | View |
| 60 | Form |
| 61 | Web resource |
| 300 | Canvas app |
| 371 | Connector |
MSCRM.SolutionName headerMetadata created through the Web API is added to a solution automatically when the request carries the MSCRM.SolutionName header (SDK metadata calls take solution="<UniqueName>" instead):
from auth import get_token
token = get_token()
headers = {
"Authorization": f"Bearer {token}",
"OData-MaxVersion": "4.0",
"OData-Version": "4.0",
"Accept": "application/json",
"Content-Type": "application/json",
"MSCRM.SolutionName": "<UniqueName>",
}
Always verify afterwards. A misspelled header or missing solution silently puts components in the default solution. pac solution list-components does not exist — query solutioncomponent:
sol = client.records.list(
"solution",
filter="uniquename eq '<UniqueName>'", select=["solutionid"], top=1,
).first()
if sol is not None:
components = client.records.list(
"solutioncomponent",
filter=f"_solutionid_value eq {sol['solutionid']}",
select=["componenttype", "objectid"],
)
print(f"{len(components)} components in the solution")
pac solution list --environment <url>
Pass the UniqueName column to other commands. Display names contain spaces; unique names do not.
Confirm the environment first. Run
pac auth listandpac org who, show the output, and have the user confirm it is the intended environment. Never assume.
Export as unmanaged (the source of truth):
pac solution export \
--name <UniqueName> \
--path ./solutions/<UniqueName>.zip \
--managed false \
--environment <url>
Unpack into editable source:
pac solution unpack \
--zipfile ./solutions/<UniqueName>.zip \
--folder ./solutions/<UniqueName> \
--packagetype Unmanaged
Windows file-lock race: run export and unpack as separate commands. Chaining them immediately can hit a transient ZIP lock. If unpack fails with a lock or "in use" error, retry after a moment and check the unpacked folder has the expected components before deleting the zip.
Delete the zip — the unpacked folder is the source — and commit:
rm ./solutions/<UniqueName>.zip
git add ./solutions/<UniqueName>
git commit -m "chore: pull <UniqueName> baseline"
git push
pac solution pack \
--zipfile ./solutions/<UniqueName>.zip \
--folder ./solutions/<UniqueName> \
--packagetype Unmanaged
Import (async recommended for large solutions):
pac solution import \
--path ./solutions/<UniqueName>.zip \
--environment <url> \
--async \
--activate-plugins
Poll the job with pac solution list --environment <url>.
--managed false / --packagetype Unmanaged for the development solution. Managed packages are for downstream environments (test, prod).--activate-plugins activates registered plugins contained in the solution.--import-mode ForceUpgrade.Verify components are live with the SDK. No extra scripts are needed.
info = client.tables.get("<logical_name>")
if info:
print(f"[PASS] Table '{info.logical_name}' exists")
else:
print("[FAIL] Table '<logical_name>' not found")
forms = client.records.list(
"systemform",
filter="objecttypecode eq '<entity>' and type eq <form_type_code>",
select=["name", "formid"],
top=5,
)
# Form type codes: 2 = main, 7 = quick create
views = client.records.list(
"savedquery",
filter="returnedtypecode eq '<entity>'",
select=["name", "savedqueryid", "statuscode"],
top=10,
)
$expand)records.list passes $expand straight through, so read the N:N navigation property directly:
users = list(client.records.list(
"systemuser",
filter="internalemailaddress eq '<email>'", # fallback: domainname eq '<upn>'
select=["fullname"],
expand=["systemuserroles_association($select=name)"],
top=1,
))
roles = [r["name"] for r in users[0].get("systemuserroles_association", [])] if users else []
Or use the managed Dataverse CLI escape hatch (not urllib), or FetchXML with a link-entity:
dataverse api request --target dataverse --method GET \
--path "/api/data/v9.2/systemusers?%24filter=internalemailaddress eq '<email>'&%24select=fullname&%24expand=systemuserroles_association(%24select=name)&%24top=1" \
--environment <DATAVERSE_URL>
value[0].systemuserroles_association lists the assigned roles, each with name.
jobs = client.records.list(
"importjob",
select=["importjobid", "solutionname", "startedon", "completedon", "progress"],
orderby=["startedon desc"],
top=5,
)
history = client.records.list(
"msdyn_solutionhistory",
filter="msdyn_status eq 1", # 1 = failed
select=["msdyn_name", "msdyn_starttime", "msdyn_exceptionmessage"],
orderby=["msdyn_starttime desc"],
top=5,
)
| Error | Cause | Fix |
|---|---|---|
| Table not found after import | Component not in the solution | Add it with pac solution add-solution-component |
| Form check fails immediately | Publishing is async | Wait 30 seconds and retry |
| Role not assigned | User not provisioned | Assign with pac admin assign-user (see dataverse-security) or the Power Platform admin center |
| Import job stuck at 0% | Import still running | Poll again in 60 seconds |
new.scripts/auth.py. See dataverse-query for query patterns and dataverse-data for writes.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/dataverse-adminEnvironment-level Microsoft Dataverse administration: bulk delete, retention and archival, organization settings, OrgDB settings, recycle bin, audit, and a hard allowlist of 37 Power Platform admin center toggles. USE FOR: bulk delete records, schedule bulk delete job, cancel or pause bulk delete, data retention policy, archive old records, enable auditing, audit retention, plugin trace log, org settings, pac org update-settings, OrgDB settings, enable MCP server, Dataverse search, TDS endpoint, recycle bin on or off, recycle bin cleanup days, app-level security roles toggle, multi-environment settings rollout. DO NOT USE FOR: record CRUD or sample data (use dataverse-data), tables and columns (use dataverse-metadata), reading records (use dataverse-query), solution export or import (use dataverse-solution), security roles and self-elevate (use dataverse-security).
/dataverse-connectOne-step, idempotent setup and connection diagnostics for a Microsoft Dataverse environment: installs tools, authenticates the Dataverse CLI and PAC CLI, writes `.env`, copies the Python auth helper into the project, registers the Dataverse MCP server, and verifies the connection. USE FOR: connect to Dataverse, set up a new Dataverse project, switch environment, fix Dataverse authentication, dataverse auth create, pac auth create, register Dataverse MCP server, MCP not working, allowlist MCP client, dataverse mcp allow, scripts/auth.py --check, privilege preflight. DO NOT USE FOR: creating tables or columns (use dataverse-metadata), reading or writing records (use dataverse-data), querying data (use dataverse-query), solution export or import (use dataverse-solution), environment settings (use dataverse-admin).
/dataverse:dataverse-solutionfrom dataverse
npx claudepluginhub atc-net/atc-agentic-toolkit --plugin dataverseOther plugins' skills for the same job