power-bi-security-and-docslisted
Install: claude install-skill mudassir09/pbi-enterprise-cli
# power-bi-security-and-docs
RLS security, perspectives, role testing, data dictionary, audit logs, and lineage.
## Quick Reference
```bash
# RLS role management
pbi security roles list
pbi security role-add --name "EMEA Sales" \
--table Sales --filter "Sales[Region] = USERNAME()"
pbi security role-add --name "Manager View" \
--table Employee --filter "Employee[ManagerEmail] = USERPRINCIPALNAME()"
pbi security role-delete --name "Old Role"
pbi security role-test --role "EMEA Sales" --user "alice@contoso.com"
pbi security role-test --role "EMEA Sales" --user "alice@contoso.com" --json
# Perspectives
pbi security perspective-add --name "Finance View" \
--include-tables "Sales,Calendar,Finance" \
--include-measures "Total Revenue,Gross Margin %"
pbi security perspective-list
pbi security perspective-delete --name "Draft"
# Documentation generation
pbi docs generate --format markdown --output ./docs/data-dictionary.md
pbi docs generate --format confluence --output ./docs/confluence-export.json
pbi docs generate --format markdown --include-measures --include-lineage
pbi docs generate --table Sales --format markdown # single table
pbi docs lineage --format mermaid --output ./docs/lineage.md
pbi docs lineage --format json --output ./docs/lineage.json
# Audit log
pbi docs audit-log --last 30d --format json
pbi docs audit-log --user "alice@contoso.com" --format markdown
```
---
## Worked Example 1: Dynamic RLS with USERNAME()
```bash
# Role: each user sees only thei