Official agent skill

Dv Security

by microsoft in microsoft/Dataverse-skills

Security-role assignment, user access, application users, business units, and admin self-elevation in Dataverse environments.

OfficialMITAuto-check passedAI & LLM Engineering

Install Dv Security

skills CLI
$ npx skills add microsoft/Dataverse-skills --skill dv-security -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/Dataverse-skills dv-security --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/Dataverse-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/plugins/dataverse/skills/dv-security .claude/skills/dv-security && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dv-security
GitHub stars
241
Token cost
~2.1k tokens
SKILL.md length
884 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Security-role assignment, user access, application users, business units, and admin self-elevation in Dataverse environments.

  • Works in 2 steps: Read the output, not just the exit code.… → Confirm against the exact --environment…
  • The user wants to give someone access
  • SKILL.md covers Preview Before Running, Skill boundaries, Prerequisites and Assign a Security Role to a User, plus 4 more sections
  • Calls python; reaches dev1.crm.dynamics.com and dev2.crm.dynamics.com

What it does

Dv Security is an agent skill from microsoft/Dataverse-skills, published by the product's own GitHub organization. Security-role assignment, user access, application users, business units, and admin self-elevation in Dataverse environments. Use when the user wants to give someone access, grant a role, become an admin, or add a service principal.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering. It works with Power Automate and Model Context Protocol. The repository describes itself as: Microsoft Dataverse skills for AI coding agents. Wraps the Dataverse MCP server, Dataverse CLI, Python SDK, and PAC CLI behind specialist skills for building, querying… The licence is MIT.

When your agent uses it

  • The user wants to give someone access
  • Become an admin
  • Add a service principal

Example prompts

  • “/dv-security”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Read the output, not just the exit code. A failed run still exits 0 but prints an error (environment ... not found, role ... does not…
  2. Confirm against the exact --environment you used — do not re-resolve or shorten it; a different id silently "succeeds" on the wrong org…

What it can do on your machine

Read from SKILL.md and the folder at commit 3be592f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • dev1.crm.dynamics.com
    • dev2.crm.dynamics.com
    • dev3.crm.dynamics.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dv Security loads about 2.1k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 884 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/Dataverse-skills at commit 3be592f, republished under its MIT licence (© microsoft). 884 words, ~2,100 tokens.

Download SKILL.mdSave it as .claude/skills/dv-security/SKILL.md (or your agent's skills folder).
name
dv-security
description
Security-role assignment, user access, application users, business units, and admin self-elevation in Dataverse environments. Use when the user wants to give someone access, grant a role, become an admin, or add a service principal.

Skill: Security — Role Assignment and Self-Elevation

This skill uses first-party CLIs — PAC CLI for role changes, Dataverse CLI to verify. Do NOT write Python scripts for role operations.

Preview Before Running

Role grants and self-elevate are destructive (they change security posture and are logged to Purview). Before running, preview the action in plain prose — target user, role, environment(s) — using placeholders (<ENV_URL>, <USER_EMAIL>) for anything unknown, and ask for confirmation and missing values in the same turn. Skip the raw pac admin block; the user shouldn't have to read CLI syntax to approve a security change.

Key principle: the user should be able to evaluate what's about to happen from your first response. A bare "which environment?" fails that test; a one-line prose preview passes it.

Examples

Assign role (user given, env missing):

  • ❌ "Which environment should I target?"
  • ✅ "I'll assign System Administrator to user@contoso.com on <ENV_URL>. Confirm to proceed and provide the target environment URL (or 'all' to list and batch)."

Admin access across all environments:

  • ❌ "Please provide your email address."
  • ✅ "I'll list your environments, then assign System Administrator in parallel on each one for <YOUR_UPN>. If assign-user fails on any environment, I'll fall back to self-elevate (logged to Purview) for that one. Confirm to proceed and provide your UPN."

Skill boundaries

NeedUse instead
Create or modify tables, columns, relationshipsdv-metadata
Manage org settings, audit, bulk delete, retentiondv-admin
Query or read recordsdv-query
Write, update, or delete recordsdv-data
Tenant-level governance (DLP, env lifecycle)pac admin --help

Prerequisites

  • PAC CLI installed and authenticated (pac auth create)
  • System Administrator role in target environment (or Global/PP/D365 Admin for self-elevate)
  • Active auth profile: pac auth list
  • Headless / restricted-egress hosts: SDK handles role / user / business-unit ops; service principal for PAC-only ops; verify egress with python scripts/auth.py --check. See dv-connect/references/headless-hosts.md.

Assign a Security Role to a User

bash
pac admin assign-user --user <email-or-object-id> --role "System Administrator" --environment <url>
Arguments
ArgumentAliasRequiredDescription
--user-uYesUser email (UPN) or Azure AD object ID
--role-rYesSecurity role name (e.g., System Administrator, Basic User)
--environment-envYesTarget environment URL or ID
--application-user-auNoTreat user as an application user (service principal)
--business-unit-buNoBusiness unit ID. Defaults to the caller's business unit

Verify the assignment — exit code 0 is not proof

pac admin assign-user exits 0 even when it fails (unresolved environment, wrong role name, unknown user). Never treat a clean exit as success.

  1. Read the output, not just the exit code. A failed run still exits 0 but prints an error (environment ... not found, role ... does not exist). Stop if the output contains an error.
  2. Confirm against the exact --environment you used — do not re-resolve or shorten it; a different id silently "succeeds" on the wrong org. Query the user's roles with a Dataverse CLI read:
bash
# Resolve the user's systemuserid, then list their assigned roles.
# --context carries plugin/skill/agent attribution on the managed CLI call.
dataverse api request --target dataverse --method GET \
  --path "/api/data/v9.2/systemusers?%24select=systemuserid&%24filter=internalemailaddress eq 'user@contoso.com'" \
  --environment <same-url-as-assign> \
  --context "app=dataverse-skills/<ver>;skill=dv-security;agent=<agent>"
dataverse api request --target dataverse --method GET \
  --path "/api/data/v9.2/systemusers(<systemuserid>)/systemuserroles_association?%24select=name" \
  --environment <same-url-as-assign> \
  --context "app=dataverse-skills/<ver>;skill=dv-security;agent=<agent>"

If the first query returns no row, the sign-in identity may live on domainname (the AAD UPN) rather than internalemailaddress (Primary Email) — retry with %24filter=domainname eq '<upn>', or azureactivedirectoryobjectid eq '<objectid>' when you assigned by object id. A missing row is not proof the grant failed.

If the target role is absent, the assignment did not take — re-run, read the output, or fall back to self-elevate.


Show full SKILL.md (360 more words)Show less

Batch Workflow: Assign Role Across Multiple Environments

Run in parallel — never sequentially:

Step 1: pac admin list                                              -> Get all environments
Step 2: Filter by type if needed (e.g., Developer, Sandbox)        -> Identify targets
Step 3: Confirm with user — show list of target environments
Step 4: Run ALL assignments in a single bash call:
bash
pac admin assign-user --user user@contoso.com --role "System Administrator" --environment https://dev1.crm.dynamics.com &
pac admin assign-user --user user@contoso.com --role "System Administrator" --environment https://dev2.crm.dynamics.com &
pac admin assign-user --user user@contoso.com --role "System Administrator" --environment https://dev3.crm.dynamics.com &
wait
Step 5: Verify each landed (exit 0 is not proof — see above), then report ("Assigned + verified on 3/3 environments")

Important: Always confirm which environments will be affected before assigning roles, and verify each assignment landed — a clean exit code does not prove success.


Tenant Admin Self-Elevation (Fallback)

Self-elevation is materially different from assigning a role to another user. pac admin assign-user <other> grants privilege to someone else; pac admin self-elevate grants privilege to the caller. The risk profile and audit posture are different, so the confirmation protocol is stricter.

If pac admin assign-user fails with "user has not been assigned any roles", use:

bash
pac admin self-elevate --environment https://myorg.crm.dynamics.com
  • Requires Global Admin, Power Platform Admin, or Dynamics 365 Admin
  • All elevations are logged to Microsoft Purview
  • Uses the active auth profile if --environment is omitted
Self-elevation confirmation protocol (stricter than assign-user)

Before running pac admin self-elevate, the agent MUST:

  1. State the risk explicitly. Include this wording (or equivalent) in the pre-run summary:

    "This grants YOU System Administrator on <env>. The action is logged to Microsoft Purview with your identity and timestamp."

  2. Capture a reason. Ask for a one-line reason — ticket ID, incident number, or a free-form note such as "dev sandbox access — no ticket". Echo the reason back in the pre-run summary so the user sees what will be on the record.
  3. Wait for an explicit confirmation AFTER the user has seen both (1) and (2). Do NOT accept a bare "yes" given before the risk statement and reason are on screen.
  4. Do NOT silently fall back. If pac admin assign-user fails, surface the failure first, then offer self-elevate with this protocol — never chain them automatically.

Flow: Always try pac admin assign-user first. admin self-elevate is the documented fallback, gated by the protocol above.

CLI fallback: If pac admin self-elevate errors out, self-elevate manually via Power Platform Admin Center → select the environment → Access → System Administrator role. All elevations are still logged to Purview. (In PAC CLI 2.6.4 the command fails with bolt.authentication.http.AuthenticatedClientException / ApiVersionInvalid because the CLI sends an empty api-version= to the backend.)


Safety Rules

  • Always confirm before assigning System Administrator role
  • Show the list of target environments before batch operations
  • Self-elevation is logged and auditable — warn the user

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/plugins/dataverse/skills/dv-security of microsoft/Dataverse-skills.

Open the folder on GitHubat commit 3be592f

Compare with similar skills

Dv Security next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dv Security compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dv Security this skillmicrosoft/Dataverse-skills241—~2.1kAutomated safety check: PassMIT
Telemetrymicrosoft/power-platform-skills967—~635Automated safety check: NotesMIT
Microsoft Docsmicrosoft/ai-agents-for-beginners77k3 repos~1.2kAutomated safety check: PassMIT
Microsoft Docsmicrosoft/ai-agents-for-beginners77k—~1.5kAutomated safety check: PassMIT
Microsoft Docsmicrosoft/ai-agents-for-beginners77k—~1.6kAutomated safety check: PassMIT
Microsoft Docsmicrosoft/ai-agents-for-beginners77k—~1.3kAutomated safety check: PassMIT

Similar skills

  • Telemetry

    microsoft/power-platform-skills

    Official

    A skill your agent uses when the user wants to enable, disable, turn on or off, opt out of, opt in to, or check the status of power-automate telemetry / usage data.

    967 GitHub stars~635 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check: notes
  • Microsoft Docs

    microsoft/ai-agents-for-beginners

    Official

    Query official Microsoft documentation to find concepts, tutorials, and code examples across Azure, .NET, Agent Framework, Aspire, VS Code, GitHub, and more.

    77k GitHub starsUsed in 3 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Microsoft Docs

    microsoft/ai-agents-for-beginners

    Official

    Kysy virallista Microsoftin dokumentaatiota löytääksesi käsitteitä, opetusohjelmia ja koodiesimerkkejä Azureen, .NET:iin, Agent Frameworkiin, Aspireen, VS Codeen, GitHubiin ja muihin liittyen.

    77k GitHub stars~1.5k tokensUpdated 18 days ago
    AI & LLM EngineeringAuto-check passed
  • Microsoft Docs

    microsoft/ai-agents-for-beginners

    Official

    Interroger la documentation officielle de Microsoft pour trouver des concepts, des tutoriels et des exemples de code couvrant Azure, .NET, Agent Framework, Aspire, VS Code, GitHub, et plus encore.

    77k GitHub stars~1.6k tokensUpdated 18 days ago
    AI & LLM EngineeringAuto-check passed
  • Microsoft Docs

    microsoft/ai-agents-for-beginners

    Official

    שאילתה בתיעוד הרשמי של Microsoft למציאת מושגים, מדריכים ודוגמאות קוד ב-Azure, .NET, Agent Framework, Aspire, VS Code, GitHub ועוד.

    77k GitHub stars~1.3k tokensUpdated 18 days ago
    AI & LLM EngineeringAuto-check passed
  • Microsoft Docs

    microsoft/ai-agents-for-beginners

    Official

    आधिकारिक Microsoft दस्तावेज़ों में क्वेरी करें ताकि Azure, .NET, Agent Framework, Aspire, VS Code, GitHub, और अन्य के बारे में अवधारणाएँ, ट्यूटोरियल और कोड उदाहरण मिल सकें। डिफ़ॉल्ट रूप से Microsoft…

    77k GitHub stars~1.4k tokensUpdated 18 days ago
    AI & LLM EngineeringAuto-check passed

More from microsoft/Dataverse-skills

All 9 skills in this repo
  • Dv Connect

    microsoft/Dataverse-skills

    Official

    One-step setup and connection diagnostics for a Dataverse environment — installs tools, authenticates, registers MCP, writes .env, and verifies active profiles and linked ERP endpoints.

    241 GitHub starsUsed in 1 repo~5k tokens
    Auto-check: notes
  • Dv Admin

    microsoft/Dataverse-skills

    Official

    Environment-level Dataverse administration — bulk delete, retention/archival, organization settings, OrgDB settings, recycle bin, audit, and the 37 allowlisted PPAC toggles.

    241 GitHub stars~5.1k tokensUpdated 2 days ago
    Auto-check passed
  • Dv Data

    microsoft/Dataverse-skills

    Official

    Record-level CRUD and bulk operations — create, update, delete, upsert, CSV import, multi-table foreign-key loads, AI-generated sample data.

    241 GitHub stars~4.8k tokensUpdated 2 days ago
    Auto-check: notes
  • Dv Query

    microsoft/Dataverse-skills

    Official

    Bulk reads, multi-page iteration, and analytics over Dataverse data.

    241 GitHub stars~4.5k tokensUpdated 2 days ago
    Auto-check: notes
  • Erp Xpp

    microsoft/Dataverse-skills

    Official

    X++ code development lifecycle for Finance and Operations — scaffold models, author classes, custom services/APIs, and data entities, install matching SDKs, compile deployable packages, deploy…

    241 GitHub stars~3.8k tokensUpdated 2 days ago
    Auto-check passed
  • Dv Metadata

    microsoft/Dataverse-skills

    Official

    Dataverse schema authoring and inspection — tables, columns, relationships, forms, and views.

    241 GitHub stars~5.4k tokensUpdated 2 days ago
    Auto-check: notes

Questions about Dv Security

What does Dv Security do?

Security-role assignment, user access, application users, business units, and admin self-elevation in Dataverse environments. Dv Security is an agent skill from microsoft/Dataverse-skills, published by the product's own GitHub organization. Security-role assignment, user access, application users, business units, and admin self-elevation in Dataverse environments.

When should I use Dv Security?

Dv Security fits situations like: the user wants to give someone access; become an admin; add a service principal.

How do I install Dv Security in Claude Code?

Run `npx skills add microsoft/Dataverse-skills --skill dv-security -a claude-code`. Or copy the skill folder (.github/plugins/dataverse/skills/dv-security in microsoft/Dataverse-skills) into .claude/skills/dv-security in your project. Claude Code loads it when a task matches its description.

How do I install Dv Security in Codex?

Run `npx skills add microsoft/Dataverse-skills --skill dv-security -a codex`. Or copy the skill folder (.github/plugins/dataverse/skills/dv-security in microsoft/Dataverse-skills) into .agents/skills/dv-security in your project. Codex loads it when a task matches its description.

Can I use Dv Security in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/Dataverse-skills --skill dv-security -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dv-security, .gemini/skills/dv-security, .github/skills/dv-security and .opencode/skills/dv-security in your project.

What does Dv Security need to run?

Going by SKILL.md and its folder, Dv Security needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Dv Security access the network?

SKILL.md names 3 domains. In commands or code: dev1.crm.dynamics.com, dev2.crm.dynamics.com and dev3.crm.dynamics.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Dv Security safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dv Security use?

Dv Security is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dv Security use?

About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dv Security?

Skills that share tags, products or a category with Dv Security: Telemetry (microsoft/power-platform-skills, 967 stars), Microsoft Docs (microsoft/ai-agents-for-beginners, 77k stars), Microsoft Docs (microsoft/ai-agents-for-beginners, 77k stars) and Microsoft Docs (microsoft/ai-agents-for-beginners, 77k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dv Security?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/Dataverse-skills, which has 241 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 5, 2026.

Source: microsoft/Dataverse-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.