/power-bi-security
Configure row-level security (RLS) roles, object-level security, and perspectives for Power BI semantic models using pbi-cli. Invoke this skill whenever the user mentions "security", "RLS", "row-level security", "access control", "data restrictions", "who can see", "filter by
$ npx -y skills add MinaSaad1/pbi-cli --skill power-bi-security --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/power-bi-security
Context preview
The summary Claude sees to decide when to auto-load this skill.
Configure row-level security (RLS) roles, object-level security, and perspectives for Power BI semantic models using pbi-cli. Invoke this skill whenever the user mentions "security", "RLS", "row-level security", "access control", "data restrictions", "who can see", "filter by
SKILL.md
power-bi-security.SKILL.mdname: Power BI Security
description: Configure row-level security (RLS) roles, object-level security, and perspectives for Power BI semantic models using pbi-cli. Invoke this skill whenever the user mentions "security", "RLS", "row-level security", "access control", "data restrictions", "who can see", "filter by user", "perspectives", "limit visibility", or wants to restrict data access by role.
tools: pbi-cli
Power BI Security Skill
Manage row-level security (RLS) and perspectives for Power BI models.
Prerequisites
pipx install pbi-cli-tool
pbi-cli skills install
pbi connect
Security Roles (RLS)
# List all security roles
pbi security-role list
# Get role details
pbi security-role get "Regional Manager"
# Create a new role
pbi security-role create "Regional Manager" \
--description "Restricts data to user's region"
# Delete a role
pbi security-role delete "Regional Manager"
Perspectives
Perspectives control which tables and columns are visible to users:
# List all perspectives
pbi perspective list
# Create a perspective
pbi perspective create "Sales View"
# Delete a perspective
pbi perspective delete "Sales View"
Workflow: Set Up RLS
# 1. Create roles
pbi security-role create "Sales Team" --description "Sales data only"
pbi security-role create "Finance Team" --description "Finance data only"
# 2. Verify roles were created
pbi --json security-role list
# 3. Export full model for version control (includes roles)
pbi database export-tmdl ./model-backup/
Workflow: Create User-Focused Perspectives
# 1. Create perspectives for different audiences
pbi perspective create "Executive Dashboard"
pbi perspective create "Sales Detail"
pbi perspective create "Finance Overview"
# 2. Verify
pbi --json perspective list
Common RLS Patterns
Region-Based Security
Create a role that filters by the authenticated user's region:
pbi security-role create "Region Filter" \
--description "Users see only their region's data"
Then define table permissions with DAX filter expressions in the model (via TMDL or Power BI Desktop).
Department-Based Security
pbi security-role create "Department Filter" \
--description "Users see only their department's data"
Manager Hierarchy
pbi security-role create "Manager View" \
--description "Managers see their direct reports' data"
Best Practices
- Create roles with clear, descriptive names
- Always add descriptions explaining the access restriction
- Export model as TMDL for version control (`pbi database export-tmdl`)
- Test RLS thoroughly before publishing to production
- Use perspectives to simplify the model for different user groups
- Document role-to-group mappings externally (RLS roles map to Azure AD groups in Power BI Service)
- Use `--json` output for automated security audits: `pbi --json security-role list`
Read more
name: Power BI Security description: Configure row-level security (RLS) roles, object-level security, and perspectives for Power BI semantic models using pbi-cli. Invoke this skill whenever the user mentions "security", "RLS", "row-level security", "access control", "data restrictions", "who can see", "filter by user", "perspectives", "limit visibility", or wants to restrict data access by role. tools: pbi-cli
Power BI Security Skill
Manage row-level security (RLS) and perspectives for Power BI models.
Prerequisites
pipx install pbi-cli-tool pbi-cli skills install pbi connect
Security Roles (RLS)
# List all security roles pbi security-role list # Get role details pbi security-role get "Regional Manager" # Create a new role pbi security-role create "Regional Manager" \ --description "Restricts data to user's region" # Delete a role pbi security-role delete "Regional Manager"
Perspectives
Perspectives control which tables and columns are visible to users:
# List all perspectives pbi perspective list # Create a perspective pbi perspective create "Sales View" # Delete a perspective pbi perspective delete "Sales View"
Workflow: Set Up RLS
# 1. Create roles pbi security-role create "Sales Team" --description "Sales data only" pbi security-role create "Finance Team" --description "Finance data only" # 2. Verify roles were created pbi --json security-role list # 3. Export full model for version control (includes roles) pbi database export-tmdl ./model-backup/
Workflow: Create User-Focused Perspectives
# 1. Create perspectives for different audiences pbi perspective create "Executive Dashboard" pbi perspective create "Sales Detail" pbi perspective create "Finance Overview" # 2. Verify pbi --json perspective list
Common RLS Patterns
Region-Based Security
Create a role that filters by the authenticated user's region:
pbi security-role create "Region Filter" \ --description "Users see only their region's data"
Then define table permissions with DAX filter expressions in the model (via TMDL or Power BI Desktop).
Department-Based Security
pbi security-role create "Department Filter" \ --description "Users see only their department's data"
Manager Hierarchy
pbi security-role create "Manager View" \ --description "Managers see their direct reports' data"
Best Practices
- Create roles with clear, descriptive names
- Always add descriptions explaining the access restriction
- Export model as TMDL for version control (`pbi database export-tmdl`)
- Test RLS thoroughly before publishing to production
- Use perspectives to simplify the model for different user groups
- Document role-to-group mappings externally (RLS roles map to Azure AD groups in Power BI Service)
- Use `--json` output for automated security audits: `pbi --json security-role list`
Power BI CLI - semantic models (.NET TOM) and PBIR reports for token-efficient AI agent usage, built for Claude Code
Repo: MinaSaad1/pbi-cli
Other skills on pbi-cli.
- /power-bi-custom-visuals
Vibe-code Power BI custom visuals end-to-end: scaffold a TypeScript project, iterate on src/visual.ts and capabilities.json, validate with the Power BI Visuals SDK toolchain, package to .pbiviz, and import into a PBIR report. Invoke this skill whenever the user mentions "custom
Open skill - /power-bi-dax
Write, execute, and optimize DAX queries and measures for Power BI semantic models using pbi-cli. Invoke this skill whenever the user mentions DAX, queries data in Power BI, writes calculations, creates measures, asks about EVALUATE, SUMMARIZECOLUMNS, CALCULATE, time
Open skill - /power-bi-deployment
Import and export TMDL/TMSL formats, manage model lifecycle with transactions, and version-control Power BI semantic models using pbi-cli. Invoke this skill whenever the user mentions "deploy", "export", "import", "TMDL", "TMSL", "version control", "git", "backup", "migrate",
Open skill - /power-bi-diagnostics
Troubleshoot Power BI model performance, trace query execution, manage caches, and verify the pbi-cli environment using pbi-cli. Invoke this skill whenever the user says "pbi not working", "setup issues", "connection failed", "slow query", "performance", "profiling", "tracing",
Open skill - /power-bi-docs
Auto-document Power BI semantic models by extracting metadata, generating documentation, and cataloging all model objects using pbi-cli. Invoke this skill whenever the user says "document this model", "what's in this model", "list everything", "data dictionary", "model
Open skill - /power-bi-filters
Add, remove, and manage page-level and visual-level filters on Power BI PBIR reports using pbi-cli. Invoke this skill whenever the user mentions "filter", "TopN filter", "top 10", "bottom 5", "relative date filter", "last 30 days", "categorical filter", "include values",
Open skill

