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 user", "perspectives", "limit visibility", or wants to restrict data access by role.
What this skill does
# Power BI Security Skill Manage row-level security (RLS) and perspectives for Power BI models. ## Prerequisites ```bash pipx install pbi-cli-tool pbi-cli skills install pbi connect ``` ## Security Roles (RLS) ```bash # 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: ```bash # 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 ```bash # 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 ```bash # 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: ```bash 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 ```bash pbi security-role create "Department Filter" \ --description "Users see only their department's data" ``` ### Manager Hierarchy ```bash 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` --- ## Gotchas - **`USERPRINCIPALNAME()` returns different values in Desktop vs Service:** Desktop returns the AAD UPN of the signed-in user; Service returns the embedded token UPN, which can differ for guest users or B2B identities. RLS that passes local tests can silently fail in Service. - **`security-role create` only creates the role envelope — table filter expressions must be added via TMDL or Desktop:** A role with no filter expressions appears in Service as "applied" but returns ALL rows. Always export TMDL after creating and verify each table has the expected `tablePermission` block. - **Object-level security and perspectives are NOT the same:** Perspectives only hide objects in the field list; users can still query hidden tables/columns via DAX. For actual security, use OLS (encoded in TMDL as `metadataPermissions`) — perspectives are UX only. - **RLS roles map to AAD groups in Service, not individual users:** Adding `[email protected]` directly to a role works in Desktop but is brittle in Service when the user leaves the org. Always bind to groups; document the role-to-group mapping externally since the TMDL only knows about role names. - **Dynamic RLS using `LOOKUPVALUE` on a user-mapping table is vulnerable to refresh staleness:** If a new user is added to the mapping table but the dataset has not refreshed, they see zero rows with no error. Refresh schedule must align with onboarding cadence. - **`security-role delete` removes the role and all its filter expressions atomically:** No partial cleanup, no warning if reports depend on it. Always export TMDL first — restoring a complex multi-table role from memory is painful.
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.