Hi community, please help me in publishing azure managed application to azure marketplace?

Nikhath Sulthana 0 Reputation points
2025-04-16T06:47:51.99+00:00

We are trying to publish an azure managed application to the azure marketplace. Our end goal is to deploy the code to the web app along with other required resources provisioning.

Resources are being deployed into the customer tenant, but code deployment to the web app under customer tenant is not happening through our arm templates.

We followed below ways

  1. Using PAT along with the repo url in the extensions arm resource type. The result is verification got failed
  2. Storing PAT in publisher keyvault and reading it through arm templates while creating the offer in customer tenant. The result is it is trying to search the keyvault in customer tenant and throwing error that couldn't find keyvault under customer tenant.
  3. We tried linked templates through which packaged the artifact along with the arm templates. It is throwing error that allowed package size of the arm templates is not more that 120mb.

If anyone who already published the offer to azure marketplace please guide us by sharing the best practices to publish the azure managed application offer.

Thank you

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.
171 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vinodh247 34,566 Reputation points MVP Volunteer Moderator
    2025-04-16T16:46:18.72+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    Publishing an azure Managed Application to the Azure Marketplace with web app code deployment to the customer tenant can be tricky due to security boundaries and deployment limitations. Let me walk you through key issues you are hitting, why they happen, and suggest best practices or alternatives.


    1. Using PAT in ARM extension resource

    Problem: PAT verification failed.

    Reason: PATs (Personal Access Tokens) are not the right way to authenticate deployments in ARM templates, especially from Marketplace offers. Marketplace sandboxes limit the ability to use secrets/tokens directly for security reasons.


    1. Key Vault in publisher tenant accessed by customer deployment

    Problem: ARM is looking for publisher’s Key Vault in customer tenant.

    Reason: ARM template runs in customer's context, so it cannot access resources in publisher’s tenant (like your Key Vault).

    • Fix: You must embed necessary artifacts or use publicly accessible URLs (ex: Azure Blob with SAS tokens) instead of private KeyVault access.

    1. ARM template package size exceeding 120MB

    Problem: Artifact too large when packaging code + infra.

    • Solution:
      • Break the deployment into multiple smaller templates and use linked templates via a publicly accessible Blob Storage with SAS tokens.
      Consider external deployment automation post resource provisioning (detailed below).

    Best Practices to Publish Azure Managed Application with Code Deployment

    A. Separation of Infra and App Code

    ARM templates are designed to provision infrastructure, not to deploy full-scale applications (especially code). Ideally:

    1. Use ARM/Bicep to deploy resources (App Service, KeyVault, etc.).

    Use custom script extension, Azure DevOps pipeline, or GitHub Actions to deploy app code post-deployment.

    B. Use a Deployment Script in ARM

    Use ARM template with a Microsoft.Resources/deploymentScripts resource that:

    • Pulls code from a public/private repo (you can inject secrets via parameters or Key Vault within the customer's environment).
    • Deploys the app using az webapp deployment or zipdeploy.

    C. Deliver App via Azure Storage and Download in Customer Tenant

    • Upload your zipped application code to a Storage Account with a timebound SAS token.

    In customer deployment, use deployment scripts or custom extensions to download and deploy to the web app.

    D. Use Managed Identity for Secure Deployment (if applicable)

    If your deployment involves sensitive actions (fetching secrets from customer side Key Vaults), ensure your deployment script or resource uses System Assigned Managed Identity with necessary permissions.

    Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.

    1 person found this answer helpful.

Your answer

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