There are many references available for provisioning a Unified Developer Environment (UDE) for D365 F&O. I appreciate all the blogs and references that helped me. In this blog, I am sharing the issues I faced, my assumptions about the root cause, and the workarounds that helped me.
Key Observations
Ensure your local machine has enough capacity to install Visual Studio and add-ins(Power platform tolls for Vs 2022, Finance and Operations (Dynamics 365)).
While UDE can be created from PPAC, Microsoft recommends PowerShell provisioning.
-
Running all the PowerShell commands from a single script file together does not work. Each command must be executed step by step in sequence.
-
If you already have admin rights on your laptop, you may not face some of the issues listed below.
If you didn't have admin access on your laptop, you must have admin rights for both PowerShell (temporary admin access) and Visual Studio in your local computer.
The UDE VM provisioning process took almost 2 hours to complete. During this time, the environment appeared in Preparing state before finally switching to Ready.
The D365 F&O Extension download process took 2 hours to complete.
UDE environments are important for building Custom AI agents and integrating them with Microsoft Copilot via Copilot Studio.
Issues, Assumptions, and Workarounds
Issue 1: PowerShell Module Error
Add-PowerAppsAccount -Endpoint prod
or
New-PowerAppManagementApp -ApplicationId $appId
failed with module import error.
Error message: The 'Add-PowerAppsAccount' command was found in the module 'Microsoft.PowerApps.Adminstration.PowerShell, for more information, run Import-Module Microsoft.PowerApps.Adminstration.PowerShell'
Explanation / Assumption:
Even when running PowerShell as Administrator, the script could not execute because my laptop blocked commands due to execution policies set by my organization.
Workaround:
With IT support, I first ran below script in PowerShell:
After that, the command executed successfully.
This environment can’t be created because your org tenant does not have enough Finance and Operations Capacity.
Explanation / Assumption:
Even though 1 GB of Finance and Operations database storage was available, the script failed because the F&O license was not assigned to my account.
Workaround:
Once the license was allocated, I reran the script and the environment provisioned without error.
Error message:
“This environment can’t be created because your org (tenant) needs at least 1GB of database capacity.”
Explanation / Assumption:
My tenant had exceeded the allowed Dataverse capacity. Without freeing up or extending capacity, new environments cannot be created.
Workaround:
I enabled a Dataverse capacity extension in the Power Platform Admin Center, and the script executed successfully.
✅ After resolving the issues above, and the UDE was provisioned successfully.
Initially, the environment appears in Preparing state in PPAC.
After completion, the status changes to Ready.
Issue 4: Dataverse Connection Failed in VS 2022
Error:
While connecting from Visual Studio 2022, Dataverse server name was required and the connection failed.
Explanation / Assumption:
The newly created UDE environment was available, but security restrictions (organization security app) blocked Visual Studio from connecting to Dataverse.
Workaround:
After authenticating of (organization security app), the connection worked. The download process started, and I could see updates in the output window.
👉 If you face this, check if any other security software is blocking the connection.
Issue 5: Incomplete Package Download
Error: Download ended prematurely, and unzip failed and Downloaded file was corrupted and unzip failed with error:
End of Central Directory record could not be found.
Explanation / Assumption:
Visual Studio attempted to download both PackagesLocalDirectory.zip and the DB (.bak) file within the 2-hour execution window. The download ended early, resulting in a corrupted zip.
Workaround:
Renamed the incomplete Dynamics365 folder to Dynamics365Old, reconnected using a different network, and retried.
This time the download and unzip completed successfully.
👉 This was my journey of provisioning a UDE VM using PowerShell. Hopefully, it helps someone facing similar challenges.
⚠️ Disclaimer: I am not a PowerShell expert. These are just my personal observations and assumptions. Before executing any commands, please validate with your internal admin team.
No comments:
Post a Comment