Share via

Automating Azure Marketplace Preview Deployment (Managed Application) via CLI / API

AzurePublishing Cryptshare 0 Reputation points
2026-04-07T23:28:25.7466667+00:00

Hi,

I am working on automating the deployment of a preview Azure Marketplace offer.

The offer is published via Microsoft Partner Center and appears in Azure as an Azure Managed Application.

Cryptshare-Marketplace-Offers

Current behaviour

  • Deployment via Azure Portal works as expected
  • The Portal internally uses an ARM template (templateLink from catalogartifact.azureedge.net)
  • We were able to replicate this using Microsoft.Resources/deployments (ARM template deployment)

However, we identified a limitation:

  • Each preview publish generates a new artifact ID
  • This changes the ARM template URI
  • Our automation currently requires manually updating this URI after each publish

Questions

We would like to understand the supported and recommended way to automate this:

  1. Is there a supported way (Azure CLI / PowerShell / REST API) to retrieve the latest artifact/template URI for a Marketplace preview offer?
  2. Can Azure Managed Applications (Marketplace offers preview) be deployed programmatically using:
  • Azure CLI
    • Azure PowerShell
    • REST API
    • without manually referencing the ARM template URI?
    1. Is using Microsoft.Resources/deployments with templateLink the correct approach for automating preview deployments?
    2. Alternatively, should we be using the Microsoft.Solutions/applications resource (Managed Application deployment) for this scenario?
    3. Is there any official guidance or best practice for automating preview audience deployments from Partner Center?

Goal

Our goal is to fully automate:

  • Deploy preview offer
  • Validate deployment
  • Destroy resources

without requiring manual intervention after each preview publish.

I have attached screenshots from Partner Center and Azure Portal deployment for reference.

Thanks in advance for your guidance. The offer is published via Microsoft Partner Center and appears in Azure as an Azure Managed Application.

Azure Managed Applications
Azure Managed Applications

An Azure service that enables managed service providers, independent software vendors, and enterprise IT teams to deliver turnkey solutions through the Azure Marketplace or service catalog.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Siva shunmugam Nadessin 8,405 Reputation points Microsoft External Staff Moderator
    2026-04-08T00:05:43.25+00:00

    Hello AzurePublishing Cryptshare,

    Thank you for reaching out to the Microsoft Q&A forum. 

    When investigated it sounds like you’re an ISV trying to automate your preview‐offer deployments without having to chase a new template URI after every publish. Here’s the high-level approach that’s both supported and less brittle:

    Use the “managed‐app” resource type, not hard-coded template links • In your ARM (or Bicep/Terraform), define a resource of type Microsoft.Solutions/applications that points at your Publisher/Offer/Plan. • During deployment Azure will automatically resolve and pull down the latest template for that plan—even in Preview—so you never have to manually update a templateLink.

    Accept terms once, up front • Preview offers still require “terms” acceptance in the target subscription (same as a paid plan). You can do that programmatically with CLI/PowerShell:

    az vm image terms accept --publisher --product --plan
    

    Deploy, validate, destroy via CLI/PowerShell/REST

    az deployment group create (or New-AzResourceGroupDeployment) against your ARM template that contains only the Microsoft.Solutions/applications resource.

    • Query the deployment status or the deployed application resource’s outputs to validate success.

    • Tear everything down with az group delete (or the equivalent REST call).

    Why this is better than templateLink + Microsoft.Resources/deployments

    • A templateLink approach works, but every preview publish generates a new artifactId/URL, so your automation has to keep updating that link.

    • Using the Microsoft.Solutions/applications resource offloads that version lookup to the Marketplace service—no more manual URI updates.

    A couple of gotchas for Preview offers:

    • It can take up to 4 hours (sometimes less) after you push a new preview version for it to become visible in your preview audience’s subscriptions. In automation you may need to retry or poll until the plan shows up.

    • Make sure your subscription is listed in the Partner Center “Preview audience” for that offer.

    Let me know if you’d like a snippet of the ARM template or a sample CLI/PowerShell script. Happy to share!

    References


  2. Q&A Assist
    2026-04-07T23:28:51.67+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    For Azure Marketplace Managed Application offers, including preview, the supported automation path is to deploy the managed application resource (Microsoft.Solutions/applications) using an ARM template (or tools that emit ARM, such as Azure CLI/PowerShell/Terraform). The template itself is the contract; there is no documented API to query “latest preview artifact/template URI” from Partner Center.

    From the available guidance:

    1. How programmatic deployment of Managed Applications is supported
      • Azure Application (Managed Application) offers are deployed by creating a Microsoft.Solutions/applications resource via ARM.
      • The Azure portal generates an ARM template for the Managed Application deployment; this template creates a Microsoft.Solutions/applications resource pointing to a specific plan and passes the application‑specific parameters from the UI fields that the customer fills out in the portal.
      • The same ARM template can then be used programmatically via:
        • az deployment group create (Azure CLI)
        • Azure PowerShell deployment cmdlets
        • ARM/management-plane REST APIs
    2. Terms acceptance requirement
      • Before programmatic deployment of an Azure Application (Managed Application) plan, the subscription must accept the plan’s terms.
      • This is done with the same command used for VM offers: az vm image terms accept. Once accepted for a subscription/plan, subsequent programmatic deployments work without additional manual steps.
    3. Using Microsoft.Resources/deployments with templateLink
      • Using Microsoft.Resources/deployments to deploy an ARM template (with templateLink) is a valid way to automate Managed Application deployments, because the portal itself relies on an ARM template.
      • However, the guidance for Azure Application offers focuses on the ARM template that creates Microsoft.Solutions/applications. That template is expected to be stable and reused across deployments. The documentation does not describe any supported mechanism to dynamically resolve a changing preview artifact URL.
    4. Recommended resource type for automation
      • For Managed Application marketplace offers (including preview), the recommended programmatic deployment target is the Microsoft.Solutions/applications resource defined in the Managed Application ARM template.
      • Terraform and other tools are also expected to use this same ARM template for deployment.
    5. Preview/automation best practices from available docs
      • Azure Application offers (solution template and managed application plans) are explicitly designed to automate deployment and configuration using ARM templates.
      • The technical asset guidance emphasizes:
        • Designing and maintaining an ARM template as the primary deployment artifact.
        • Reusing the same deployment package (template) across plans when the technical configuration is the same.
        • Using standard ARM deployment tooling (Azure CLI, PowerShell, REST, Terraform) for automation.
      • No additional preview‑specific API or pattern is documented for automatically discovering or tracking preview artifact IDs.

    Given the available information, the supported and recommended approach for full automation is:

    • Use the Managed Application ARM template that creates Microsoft.Solutions/applications as the stable artifact.
    • Ensure the subscription has accepted the Managed Application plan terms via az vm image terms accept before running automated tests.
    • Drive deployments and teardown via standard ARM deployments (CLI/PowerShell/REST/Terraform) against that template, rather than relying on changing templateLink URLs generated per preview publish.

    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.