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.
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
- Programmatic deployment of Microsoft Marketplace products (Managed Apps) https://learn.microsoft.com/marketplace/programmatic-deploy-of-marketplace-products
- Quickstart: Deploy a service catalog managed application (CLI/PowerShell/Portal) https://learn.microsoft.com/azure/azure-resource-manager/managed-applications/deploy-service-catalog-quickstart
- Overview of Azure Managed Applications https://learn.microsoft.com/azure/azure-resource-manager/managed-applications/overview
- Add a preview audience in Partner Center https://learn.microsoft.com/partner-center/marketplace/azure-app-preview