Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

Retrieving Environment DataCenter

Posted on by

RETRIEVING ENVIRONMENT DATACENTER

Sometimes you want to take advantage of the latest functionality, for example, connecting Dataverse with Azure Synapse as documented on https://docs.microsoft.com/en-us/power-apps/maker/data-platform/export-to-data-lake).  However, barriers, questions or concerns rise:  Synapse requires selecting a “Region” as documented on https://docs.microsoft.com/en-us/azure/synapse-analytics/quickstart-create-workspace-cli#create-an-azure-synapse-workspace-using-the-azure-cli

Then an important question arises: Power Platform Admin Center shows a “region” but is generic:

pastedimage1652373991635v3.png

while Azure components (like Synapse) allows selecting a specific datacenter within each datacenter:

https://azure.microsoft.com/en-us/global-infrastructure/geographies/#geographies

This mean that at some point, Dynamics/Platform environment are created in a region (United Kingdom) but since we don’t have specific information on which of the two datacenters the environment is, the Azure Synapse link might be created in a different datacenter, which would cause an error since environment & Synapse are in different datacenters.

We can take advantage of two different approaches:

  • Using Power Automate

Customers can use the “List Environments As Admin” action (from PowerPlatform admin).  The output of this action is a JSON File that contains several pairs of settings and one of them is precisely the AzureRegion:

pastedimage1652374200129v9.png

Because this command lists all environments in the tenant, the JSON file can be quite big but can then be processed to retrieve the specific datacenter/AzureRegion that is currently providing the service for each license and with this information, customers can provision their Synapse on the most common datacener.

pastedimage1652374218601v10.png

This is based on Tutorial: Create a daily capacity report (preview) - Power Platform | Microsoft Docs 

  • Using PowerShell

Customers can also take advantage of using Powershell, as documented on https://docs.microsoft.com/en-us/powershell/module/microsoft.powerapps.administration.powershell/get-adminpowerappenvironment?view=pa-ps-latest.  The command, GetAdminPowerApEnvironment.  IN the following screenshot we can see the Powershell version (5.1).  And using the Microsoft.PoweApps.Administration.Powershell module, we can use the command to retrieve a specific environment and check the internal properties, one of them which exposes the “AzureRegionHint”:

pastedimage1652374290951v11.png

Powershell also provides an additional interesting feature:  if customers have their Synapse already created on a specific region, they can use New-adminPowerAppEnvironment command documented on https://docs.microsoft.com/en-us/powershell/module/microsoft.powerapps.administration.powershell/new-adminpowerappenvironment?view=pa-ps-latest  and provide not only the LocationName parameter but the AzureRegion.  This way, when creating the environment, we can create the environment directly in teh same region as our Synapse repository

pastedimage1652374351581v12.png

This is discussed in detail on (99+) Provision Dynamics 365 CRM and Dataverse environments on Specific region and Datacenter - Dynamics 365 General Forum Community Forum

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans