Dataverse - how to access tables from another environment

Environments are containers for apps and Dataverse databases. Each environment can host a single Dataverse database, and it provides a place to store apps.

Let's suppose we build a canvas app, and we want to access tables from Dataverse databases that span multiple Environments from within the same tenant. How can we accomplish this?

The answer is relatively straightforward, but the option is slightly hidden away.

By default, the data panel shows tables that belong to the current environment


To add a table from a different environment, we click the elipses button next to 'Entity' heading. This opens a panel with a 'Change environment' menu item. We can click this to select a different environment, and to choose a table that belongs to the other environment.


As the screenshot beneath shows, it's possible to add the accounts table from two different environments, and we can build an app that consolidate data from multiple environments, or to copy data between tables in different environments.

Conclusion

From a canvas app, we can connect to tables from different environments by clicking the 'change environment' context menu item when we select an entity/table.