How to Create a Dynamics 365 Sandbox for Portal Testing
A sandbox is a Microsoft Dynamics 365 environment for development and testing. Connect the portal to a sandbox to try out pages, forms, roles and workflows without affecting live data. When everything works, switch the portal to your live environment.
Before you start
- You need the Power Platform administrator or Dynamics 365 administrator role in Microsoft Entra ID, or Global Administrator.
- Decide whether to create a new sandbox environment (recommended) or change the type of an existing non-production environment.
Important: Do not change the type of the environment your live portal uses. Changing your live environment to a sandbox affects your production data and users.
Create a new sandbox environment
- Sign in to the Power Platform admin center at
https://admin.powerplatform.microsoft.com. - In the left menu, select Environments.
- Select New.
- Enter a Name, choose the Region, and set Type to Sandbox.
- Add a Dataverse data store and enable the Dynamics 365 apps you use in production.
- Select Save.
Tip: To test with realistic data, copy your production environment into the sandbox instead of starting empty. Microsoft calls this copying an environment.
Change an existing environment to a sandbox
-
Sign in to the Power Platform admin center at
https://admin.powerplatform.microsoft.com. -
In the left menu, select Environments.
-
Select the environment you want to use.
-
Select Edit.
-
Under Type, select the sandbox environment type.
-
Select Save.
Prepare the sandbox for the portal
The portal needs the same setup in the sandbox as in your live environment:
- Install the CRMJetty solution in the sandbox. See How to Install the CRMJetty Solution in Dynamics 365.
- Add your Entra ID app as an application user in the sandbox environment. Application users are set per environment. See How to Register an Entra ID App for Dynamics 365 OAuth.
Connect the portal to the sandbox
- In the portal admin, go to Settings → Portal Settings → CRM Authentication.
- Enter the OTP sent to the super admin’s registered email address.
- In Service URL, enter the URL of your sandbox environment.
- In Environment, select Sandbox.
- Enter the App ID and Client Secret of the Entra ID app that has access to the sandbox.
- Select Save.
- Select Test Connection to check the connection.
For the full steps, see How to Switch the Portal Between Sandbox and Live CRM.
Note: When you connect the portal to a different environment, you can preserve or reset the existing portal data. See How to Preserve or Reset Portal Data After Reconnecting before you switch.
Related articles
- How to Switch the Portal Between Sandbox and Live CRM
- How to Register an Entra ID App for Dynamics 365 OAuth