security-role-skill

Create and configure Dataverse security roles via the Web API.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/yuseidemo/FirstCodeApps --skill security-role-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-role-skill
Source: https://github.com/yuseidemo/FirstCodeApps/tree/main/.github/skills/security-role-skill
Command: npx skills add https://github.com/yuseidemo/FirstCodeApps --skill security-role-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, msal, and includes scripts (resource) components.

What problem does it solve?

Dataverse Web API を用いてカスタムセキュリティロールをソリューション内で作成・権限設定・公開する作業を自動化し、ロール管理の工数を削減します。

Core Features & Use Cases

  • Dataverse 内のロール定義を一元管理し、AddPrivilegesRole および ReplacePrivilegesRole を用いて権限を適用します。
  • ロールの権限深度(Basic/Local/Deep/Global)とテーブル別権限を組み合わせ、マスタテーブルの AppendTo/Read 権限の整合性を保証します。
  • ソリューション containing ロールと関連オブジェクトを連携させ、ルートBUへのロール配布と子 BU への伝搬を安定させる運用パターンを提供します。

Quick Start

デプロイ用スクリプトを実行して、Dataverse 環境にカスタムセキュリティロールを作成・公開します。

Frequently Asked Questions about security-role-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Dataverse security role creation with Web API?

Automating Dataverse security role creation with Web API involves using scripts to define custom roles within a solution and apply privileges. This approach uses AddPrivilegesRole and ReplacePrivilegesRole to configure table-level permissions and business unit scope automatically.

What is the difference between AddPrivilegesRole and ReplacePrivilegesRole in Dataverse?

AddPrivilegesRole appends new privileges to an existing Dataverse security role, while ReplacePrivilegesRole overwrites the entire privilege set. Using these Web API functions ensures role definitions match exact table permissions and privilege depths like Basic, Local, Deep, or Global.

How do I set privilege depth for Dataverse security roles via Web API?

Setting privilege depth for Dataverse security roles via Web API requires defining PrivilegeDepth parameters during role configuration. You combine these depths with table-specific permissions to maintain consistency, such as aligning master table AppendTo and Read privileges within the deployment script.

Can I deploy custom security roles within a specific Dataverse solution context?

You can deploy custom security roles within a specific Dataverse solution context by linking the role creation script to your target solution. This containment ensures roles distribute correctly to the root business unit and propagate stably to child business units during deployment.

Do I need MSAL to authenticate Dataverse Web API requests for security role automation?

You need MSAL to authenticate Dataverse Web API requests for security role automation. The deployment scripts rely on the msal and requests libraries to acquire authorization tokens and execute AddPrivilegesRole or ReplacePrivilegesRole API calls securely.

Why are my Dataverse security role privileges not propagating to child business units?

Dataverse security role privileges may not propagate to child business units if the role is not properly contained within a solution or lacks root business unit distribution. Ensuring solution containment and stable root BU deployment guarantees consistent privilege propagation.