AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Dv Security

skill-microsoft-dataverse-skills-dv-security · by microsoft

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.

No reviews yet
0 installs
20 views
0.0% view→install

Install

$ agentstack add skill-microsoft-dataverse-skills-dv-security

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-microsoft-dataverse-skills-dv-security)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Dv Security? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Skill: Security — Role Assignment and Self-Elevation

This skill uses PAC CLI exclusively. 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 (`, ) 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 ``. 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 `. 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

| Need | Use instead | |---|---| | Create or modify tables, columns, relationships | dv-metadata | | Manage org settings, audit, bulk delete, retention | dv-admin | | Query or read records | dv-query | | Write, update, or delete records | dv-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

Assign a Security Role to a User

pac admin assign-user --user  --role "System Administrator" --environment 

Arguments

| Argument | Alias | Required | Description | |----------|-------|----------|-------------| | --user | -u | Yes | User email (UPN) or Azure AD object ID | | --role | -r | Yes | Security role name (e.g., System Administrator, Basic User) | | --environment | -env | Yes | Target environment URL or ID | | --application-user | -au | No | Treat user as an application user (service principal) | | --business-unit | -bu | No | Business unit ID. Defaults to the caller's business unit |


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:
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: Report summary ("Assigned System Administrator on 3/3 environments")

Important: Always confirm which environments will be affected before assigning roles.


Tenant Admin Self-Elevation (Fallback)

Self-elevation is materially different from assigning a role to another user. pac admin assign-user 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:

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 ``. The action is logged to Microsoft Purview with your identity and timestamp."

  1. 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.
  2. 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.
  3. 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 → AccessSystem 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

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.