Skip to content

New-UnifiedEnvironment hardcodes D365_DeveloperEdition instead of a documented FinOps template #121

Description

@valerymoskalenko

Summary

New-UnifiedEnvironment always creates the environment with:

templates = @("D365_DeveloperEdition")

That template ID is not in Microsoft’s documented unified ERP template list. Documented IDs are:

Template ID Display name
D365_FinOps_Finance Finance (preview)
D365_FinOps_SCM Supply Chain Management (preview)
D365_FinOps_ProjOps Project Operations Integrated (preview)
D365_FinOps_Commerce Commerce (preview) — trials only

References:

Observed impact

Provisioning with New-UnifiedEnvironment can yield a Power Platform sandbox that reaches Ready without a successfully provisioned Finance and Operations workload (e.g., FinOpsApp remains empty), consistent with not using a documented FinOps ERP template on creation.

API note (single template)

The create API field is typed as string[] / PowerShell -Templates <String[]>, but for FinOps ERP templates Microsoft’s guidance and examples use one template ID per environment (e.g. D365_FinOps_Finance). This issue proposes keeping that single-template model.

Actual code

In d365bap.tools/functions/New-UnifiedEnvironment.ps1:

linkedEnvironmentMetadata = @{
    ...
    templates = @("D365_DeveloperEdition")
}

Used for both -Type USE and -Type UDE. No way to select a documented FinOps template, and no create-time TemplateMetadata / PostProvisioningPackages for msdyn_FinanceAndOperationsProvisioningAppAnchor.

Suggested change

  1. Replace D365_DeveloperEdition with a documented FinOps template (default: D365_FinOps_Finance).
  2. Optionally add a -Template parameter validated to one of the documented FinOps template IDs.
  3. On create, pass TemplateMetadata with PostProvisioningPackages for msdyn_FinanceAndOperationsProvisioningAppAnchor, mapping USE/UDE → DevToolsEnabled and -NoDemoDbDemoDataEnabled, per Microsoft’s tutorial.

P.S. I am going to create a PR with a fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions