Testing Dynamics 365 as System Administrator hides security bugs
UAT signed off. Go-live morning, the first real users log in and get "insufficient permissions", or open a view and see nothing. Very often the reason is simple: everyone in UAT, testers included, had the System Administrator role. The build was never tested with the roles people actually use.
What System Administrator skips
System Administrator has every privilege at organisation level. That's the point of it. It also means a whole layer of the build never gets tested when you log in as one:
- Table privileges. Create, read, write, delete, append, append to, assign, share. A missing one only shows up for a user who doesn't have it.
- Access levels and business units. User, business unit, parent: child business unit, organisation. An admin sees every record in every business unit, so a view that's empty for a real user looks full in test.
- Column-level security. Microsoft is blunt about this one: column security doesn't apply to System Administrator, and the data is never hidden from them. To check it you have to use an account without that role.
- Plugins running as the caller. By default a plugin step runs as the user who triggered it. If the plugin creates or updates something that user can't touch, it fails for them and works for you.
What it looks like on go-live
- "Insufficient permissions" or a privilege error naming something like
prvAppendToon a table nobody thought about, usually behind a lookup. - Records that "disappeared". They're there, the user just can't read them at their access level, so they report it as missing data.
- Secured columns showing
********on forms where the business expected a value. - A save that fails with a plugin error, because the plugin writes to a table the user has no access to.
- Buttons or subgrids that worked for the testers and are now hidden or empty.
None of these are hard to fix. They're just expensive to find in week one with real users waiting.
How I test instead
- Build the roles early. Security roles go in alongside the first tables, not the week before go-live. They live in the solution and move through dev, test and prod like everything else.
- One test user per persona. Call centre agent, team leader, finance, read-only. Each gets exactly the roles, business unit, teams and column security profiles a real person in that job will get.
- Run the UAT scripts as those users. Not as yourself with the role "added on top". Privileges add up across roles, so an extra role you forgot to remove hides the gap again.
- Test the negatives too. A team leader in one business unit should not see another unit's cases. Write that down as a test step and check it fails the right way.
- Check plugins and flows as a normal user. Anything that runs as the caller needs a save by a real role. Where a plugin genuinely needs more access, register the step to run as a specific user or impersonate deliberately, and write down why.
- Keep admin for fixing, not testing. One admin account for configuration. Nobody runs test scripts with it.
Test users with real roles still need licences, and setting up personas takes a day or two. That's cheaper than the first week of support tickets after go-live.
Quick checks before UAT starts
- How many testers have System Administrator or System Customizer? It should be close to none.
- Is every security role in a solution, and is the same version in test and prod?
- Do the test users sit in the same business units and teams the real users will?
- Which columns are secured, and which column security profile is each persona in?
- Which plugin steps run as the calling user, and what do they write to?
Same problem in Power Pages
Portals have their own version of this. With Power Pages enhanced authorization, Dataverse checks access as the signed-in user, so plugins and secured columns behave differently. Notes on that in Power Pages enhanced authorization: what to check.
Roles that have been copied and tweaked for years, and users with System Administrator who don't need it, are part of every Dynamics 365 health check I do.