Test data management for Dynamics 365 tests: a GDPR-compliant sandbox
In short: a CRM is full of personal data, so simply copying the production database into a test environment is a data protection risk. Dataverse offers two kinds of environment copy: “Everything” or “Customizations and schemas only”. After the first, customer data must be masked before anyone gets access; after the second, you need synthetic test data. Under the GDPR, pseudonymised data is still personal data — the goal is as little real data in the sandbox as possible, with a repeatable, scripted procedure.
Why is test data an issue in Dynamics 365 CRM?
Personal data is the core of a CRM: contact names, e-mail addresses, phone numbers, correspondence, notes, complaints. A production copy in a sandbox contains exactly that, under different conditions: more people have access (developers, external testers, partners), permissions are often looser, and the environment serves other purposes.
Three GDPR principles matter most here: purpose limitation and data minimisation (Article 5), data protection by design and by default (Article 25, which names pseudonymisation as an example), and security of processing (Article 32). Testing is not the purpose for which customers provided their data — so the question is not “is it allowed?” but how much real data is actually needed.
Which environment copies does Dataverse offer?
In the Power Platform admin center an environment can be copied to a sandbox (or preview) environment; a production environment cannot be the target. According to Microsoft Learn, the target’s content is deleted and overwritten, and the copy is placed in administration mode with background operations (workflows, Exchange synchronization) disabled — which leaves time for clean-up before anyone else signs in.
| Copy | What it copies | What Microsoft suggests it for | Data protection question |
|---|---|---|---|
| Everything | all application data, users, customizations and schema | user acceptance testing, upgrade testing, early access, training | production personal data lands in the sandbox: without masking it needs the same protection as production |
| Customizations and schemas only | users, customizations and schema; account, contact, lead, activity and note tables are truncated | team development, partner solutions, proof of concept | no production customer data; test data has to be generated synthetically |
An “Everything” copy does not include audit logs by default, and Microsoft lets you restrict access to a security group when copying. Both are worth keeping or setting that way.
Pseudonymisation or anonymisation: what is the difference under the GDPR?
Pseudonymisation (GDPR Article 4(5)) means personal data can no longer be attributed to a specific person without additional information, which is kept separately and protected. According to Recital 26, pseudonymised data remains personal data; only truly anonymous data falls outside the GDPR. The European Data Protection Board’s Guidelines 01/2025, published for consultation in January 2025, cover pseudonymisation practice in detail.
In a CRM test environment, true anonymisation is rarely fully achievable, because relationships, timestamps and free text reveal a lot. The practical goal is therefore: replace direct identifiers, remove free text and attachments, and still treat what remains as personal data.
When is synthetic test data better?
For automated regression tests, almost always. On a “Customizations and schemas only” copy, the tests create the accounts, opportunities and quotes they need through the API and delete them at the end. Every run starts from the same known state, and there is no real customer data in the test environment. This needs the same tooling as API testing; see API testing in practice.
Real data is needed mainly for user acceptance testing and data migration rehearsals, because there the variety of the data is what is being tested. In that case, masking is the mandatory first step after an “Everything” copy.
What is Tosca Test Data Service for?
According to the Tricentis Tosca 2026.1 documentation, Test Data Service is a central place to register test data, give tests the right data, track the state of data over its life cycle and manage shared data. It is also available through a REST API, so it can be used from Tosca API Scan or other tools.
This helps when a test “uses up” a record: a closed opportunity or an invoiced order cannot be run again in the same state. The service tracks which record is in which state, and the next test receives one that is still usable. It does not solve data protection, though: if it holds real data, that is still personal data.
How do you build a GDPR-compliant Dynamics 365 sandbox?
- Data inventory Which tables and columns hold personal data, including custom tables and free-text fields.
- Copy type “Customizations and schemas only” for development and automated tests; “Everything” with masking for acceptance tests and migration rehearsals.
- Isolation While in administration mode: disable mailbox synchronization, review or redirect flows and integrations, check external calls in plug-ins.
- Masking or generation Scripted and repeatable, identical after every copy, instead of manual fixes.
- Verification Sampling and searching for real names and e-mail domains; only then turn administration mode off.
- Access and documentation Access restricted to a security group, and the procedure described in your data protection documentation.
How do we help?
We design the set of test environments, write the masking and data generation scripts, and build test automation so that it works with its own data. We work for German-speaking clients too, as an EU-based nearshore partner.
Details: test automation and testing.
Frequently asked questions
Is it allowed to test with production customer data?
It is not forbidden in itself, but the GDPR principles of purpose limitation and data minimisation require a justification, and the test environment must be protected like production. For most test purposes masked or synthetic data is enough, and that is the lower risk.
Is pseudonymised data still personal data?
Yes. According to GDPR Recital 26, pseudonymised data remains personal data; only truly anonymous data falls outside the regulation.
Which Dataverse copy should we use for testing?
For automated regression tests and development, “Customizations and schemas only” with synthetic data. For user acceptance testing or migration rehearsals, “Everything”, masked immediately afterwards.
What happens to e-mail after an environment copy?
According to Microsoft, the copy is placed in administration mode with background operations and Exchange synchronization disabled. Mailboxes must be disabled in the sandbox, because a mailbox cannot be synchronized with two environments at once.
Do we need Tricentis Tosca for test data management?
No. Masking and synthetic data can be scripted with any tool; Tosca Test Data Service helps if you already test with Tosca and need to track many test records that change state.
Let’s talk about your project.
Tell us what you are planning and we will get back to you within a few days.
Get in touch