Of course. After installing a new Dataverse environment, testing is not just about checking a list of roles, but about verifying that different levels of access and functionality work as expected. The roles you need to test can be broken down into two main categories:
- Environment-Level Roles: These are assigned in the Power Platform Admin Center and control what a user can do to the environment itself.
- Dataverse Security Roles: These are assigned within the environment and control a user's access to data (tables, records, and columns).
Here is a comprehensive list of the roles you should test, what to test for each, and why it's important.
Category 1: Environment-Level Roles (Power Platform Admin Center)
These roles are crucial for managing the platform and ensuring the separation of duties between administrators, customizers, and makers.
1. System Administrator
This is the highest-level role with complete control over the environment.
- Who has it: Your primary admin account.
- What to test:
- Environment Settings: Can you access and modify all settings in the Power Platform Admin Center (e.g., features, backup/restore, security)?
- Solution Management: Can you import, export, and create solutions?
- Customization: Can you create and modify tables, columns, forms, views, and business rules?
- Security Management: Can you create/edit security roles and assign users to them? Can you manage business units?
- User Management: Can you add/disable users in the environment?
- Why test: To confirm the environment was provisioned correctly and that you have full administrative control. This is your baseline "master key" test.
2. System Customizer
This role is for developers or business analysts who build and customize the application but should not manage users or environment settings.
- Who has it: A test user account for a "developer" persona.
- What to test:
- Can Do: Can they create and edit custom tables, columns, model-driven apps, and business logic? Can they work within solutions?
- Cannot Do: Can they add new users to the environment? Can they assign security roles? Can they access high-level admin settings like backups? (They should be blocked).
- Why test: To validate the principle of least privilege. This ensures that the people building your application cannot accidentally change critical security or environment configurations.
3. Environment Maker
This is the standard role for "citizen developers" who build apps and flows but don't need deep customization privileges.
- Who has it: A test user account for a "power user" or "maker" persona.
- What to test:
- Can Do: Can they create new Canvas Apps and Power Automate flows? Can they create connections to data sources? Can they create new custom tables (if the environment setting allows it)?
- Cannot Do: Can they modify system tables (like Account or Contact) or change existing security roles?
- Why test: To verify the low-code/no-code experience for users. This ensures that makers have the freedom to innovate without being able to modify the core data structure or security model built by customizers and admins.
Category 2: Dataverse Security Roles (Inside the Environment)
These roles are the heart of Dataverse security. Testing them ensures your data is protected and users can only see and do what they are supposed to.
Create dedicated test users for these roles. Do not test them with your admin account.
4. Basic User
This is the most fundamental role, providing the minimum privileges needed to run an app and perform common tasks on user-owned records.
- Who has it: A test user who will represent a standard end-user.
- What to test:
- Can the user log into a model-driven or canvas app?
- Can they see and edit their own User record?
- Can they perform basic actions on records they create and own (e.g., create an activity)?
- Crucially, can they see records owned by other users? (By default, they should not).
- Why test: To establish the absolute baseline of user access. Every other role you build will be layered on top of this.
5. Custom "Standard User" Role (e.g., Salesperson, Data Entry Clerk)
This is a role you create and configure. It's the most important one to test for your specific business application.
- Who has it: A test user representing a primary actor in your application.
- What to test (Example: Data Entry Clerk for a "Project" table):
- Create: Can the user create a new Project record?
- Read: Can the user see the Projects they created? Can they see Projects created by others? (Test this based on your access level settings: User, Business Unit, or Organization).
- Write: Can the user edit the Projects they own? Can they edit Projects owned by others?
- Delete: Are they allowed to delete a Project? (Often, this privilege is restricted).
- Navigation: Are the correct tables and views visible to them in the app's navigation? Are restricted entities hidden?
- Why test: This validates your core business logic and security model. It confirms that day-to-day users can perform their jobs without having excessive permissions.
6. Custom "Manager" Role
This role tests the hierarchical security model, where a manager can see or act on the records of their subordinates.
- How to set up:
- Create two test users (e.g.,
TestManager and TestEmployee).
- In the
Users table, set TestManager as the manager of TestEmployee.
- Create a security role where Read access on a table (e.g., "Opportunity") is set to Parent: Child Business Units or Business Unit.
- Assign this role to
TestManager.
- What to test:
- Have
TestEmployee create a new record.
- Log in as
TestManager. Can the manager see the record created by their employee?
- Why test: To ensure that your managerial oversight and reporting structure works correctly within the security model.
7. Custom "Read-Only" Role
This is for users who need to see data but must not be able to change it (e.g., auditors, executives).
- Who has it: A test user for an "auditor" or "executive" persona.
- What to test:
- Read: Grant this role Organization-level Read access on key tables. Can the user see all records in those tables?
- Deny Write/Create/Delete: When the user opens a record, are all fields read-only? Is the "Save" button disabled? Is the "New" button hidden or disabled? Is the "Delete" button hidden or disabled?
- Why test: To confirm that sensitive data can be viewed for reporting or analysis without any risk of accidental modification or deletion.
Recommended Testing Strategy
- Create Test Users: Create a separate test user in Microsoft 365/Azure AD for each persona you need to test (e.g.,
test.admin, test.customizer, test.user, test.manager). Do not rely on your own user account.
- Use an "InPrivate" or "Incognito" Browser Window: Log in as the test user in a separate browser window to keep your admin session active. This allows you to quickly make a change as an admin and refresh the test user's screen to see the effect.
- Document Expected Outcomes: For each test, write down what should happen and what should not happen.
- Test the Negatives: It's more important to test that a user cannot do something they are not supposed to do than to test that they can do what they are supposed to. This is the key to a secure system.
- Use Helper Tools: Browser extensions like Level up for Power Apps are excellent for quickly checking a user's security roles, privileges, and troubleshooting permission issues directly in the user interface.