@power-maverick/tool-security-role-comparator
v2.0.1
Published
Compare one security role against up to 5 other roles in the same Dataverse environment
Downloads
177
Maintainers
Readme
Security Role Comparator
Compare one security role against multiple other roles in Dataverse—side by side, privilege by privilege, with combined permission analysis.
Table of Contents
UI Preview

Features
- ✅ React 18 with TypeScript
- ✅ Vite for fast development and optimized builds
- ✅ Compare base role against up to 5 other roles simultaneously
- ✅ Category grouping (Tables, Miscellaneous, Privacy Related)
- ✅ Accurate privilege mapping from entity metadata
- ✅ Depth icons for visual permission levels
- ✅ Directional difference indicators (+ for more, - for less permissions)
- ✅ Combined Permission analysis (additive security model)
- ✅ Advanced filtering: Row filter, Group/Operation filters
- ✅ Search functionality (display name, schema name, operation)
- ✅ Remembered selections per environment
- ✅ Dark/light theme support
- ✅ Set as Base quick swap functionality
Installation
Install dependencies:
npm installDevelopment
Run development server:
npm run devBuild for production:
npm run buildPreview production build:
npm run previewUsage in ToolBox
Build the tool:
npm run buildThe built files will be in the
dist/directory:index.html- Main entry pointindex.js- Bundled applicationindex.css- Compiled styles
Install the tool in Power Platform ToolBox through the UI
Use Security Role Comparator:
- Select a base role
- Choose up to 5 comparison roles
- Click Compare to analyze privileges
- Use filters to focus on specific areas
- View Combined Permission for additive analysis
Key Concepts
Side-by-Side Comparison
The tool displays privileges in a grid showing:
- Base role permissions in the first column
- Comparison roles in subsequent columns
- Color-coded difference indicators (green + for more, red - for less)
- Category grouping like the native Dataverse role editor
Select roles are remembered per environment for quick re-comparison.
Combined Permission Analysis
The Combined Permission view answers: "If a user had all selected roles, what could they do?"
This reflects Dataverse's additive security model where a user's effective permission is the broadest scope granted by any assigned role. The combined value uses:
None → User → Business Unit → Parent-Child Business Unit → Organization
Privilege Depth
Each privilege depth is represented with an icon:
| Icon | Level | Description | | --------------- | --------------- | --------------------- | | 🚫 Prohibited | None | Not granted | | 👤 Person | User | Own records only | | 👥 People | Business Unit | Business unit records | | 👨👩👧 People team | Parent-Child BU | Including child BUs | | 🏢 Organization | Organization | All records globally |
Technical Stack
- React 18 with TypeScript
- Vite for fast development and optimized production builds
- Fluent UI React Components for modern UI
- PPTB API for all Dataverse operations
- @pptb/types - PPTB type definitions
Troubleshooting
Roles Not Loading
Issue: Role lists appear empty
Solution:
- Verify you have appropriate Dataverse permissions
- Check connection context is correct
- Try refreshing the tool
- Ensure roles exist in the environment
Privilege Mapping Issues
Issue: Privileges don't appear or show incorrect categorization
Solution:
- Verify roles are loaded correctly
- Check Dataverse environment is accessible
- Try comparing with a different role
- Review console for error messages
Filter Not Working
Issue: Filters don't reduce results as expected
Solution:
- Verify filter criteria match privilege names
- Try clearing filters and applying one at a time
- Use the search feature for more precise filtering
- Check that roles have privileges to filter
Performance Issues
Issue: Tool is slow with many roles or privileges
Solution:
- Use filters to reduce displayed data
- Reduce number of comparison roles
- Clear browser cache and refresh
- Try comparing fewer roles at once
Best Practices
- Test Assignments: Use Combined Permission to verify user access
- Audit Permissions: Regularly compare roles to ensure consistency
- Document Differences: Screenshot comparisons for compliance
- Role Consolidation: Identify overlapping role permissions
- Principle of Least Privilege: Use comparisons to minimize excess permissions
Contributing
Contributions are welcome! When contributing:
- Maintain PPTB integration patterns
- Keep webview bundle browser-only (no Node.js dependencies)
- Test in Power Platform ToolBox
- Update documentation as needed
- Follow existing code style
License
This project is licensed under the GPL-2.0 License - see the LICENSE file for details.
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
