CI/CD deployment of synapse workspace failing on second set of artifacts...

Jane Illarionova 1 Reputation point Microsoft Employee
2025-11-14T20:13:57.02+00:00

I have a CICD pipeline for deploying my synapse workspace and additional artifacts to production. Step 1 (succeeds) deploys/creates the workspace.
Step 2 (succeeds) uses the TemplateForWorkspace.json to deploy all the artifacts (notebooks, pipelines, linkedservices) to the azure workspace from step 1.

Step 3 (fails) uses a third template file and attempts to deploy more artifacts to the workspace but fails on the Create operation, with Status: NotFound, and non-descript error message "BadRequest". The linked services in this template are ADLS Gen2 objects that use a cert from a keyvault linked service defined in the template of step 2. Step 3 only starts when step 2 completes, and I've verified that the linked services that I'm referencing in step 3 exist. I am able to manually create the linked services and read the cert from the KV in portal from my workspace, so I know the workspace has all the appropriate permissions.

Questions:

  1. Are two artifact deployments supported in Synapse? i.e. when step 3 runs, does it clear the existing artifacts out of the workspace, or is it able to reference them?
  2. Should step 3 be defined as a "deploy" action, or an extension? (i am able to see the failure in Azure when I use deploy, but not when i use the extension)
  3. Is there a way to define my extension or templates or other deployment files to ensure that the other artifacts persist between steps?

Thankyou.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Swapnesh Panchal 1,365 Reputation points Microsoft External Staff Moderator
    2025-11-25T00:39:23.8066667+00:00

    Hi Jane Illarionova ,
    Welcome to the Microsoft Q&A and thank you for posting your questions here,
    This error occurs when the ARM template for your Synapse workspace tries to deploy a Credential referencing a User-Assigned Managed Identity (UAMI) that isn’t attached to the workspace. The root cause is usually hardcoded dev values in the published template, or missing parameterization for environment-specific properties.

    Recommended approach:

    • Option 1 (Preferred): Parameterize in Synapse
      • Use template-parameters-definition.json at the repo root to specify which Linked Service and Credential properties (like Dataverse URL and UAMI resourceId) should be parameters.
      • Publish the workspace to generate a template with parameter placeholders.
      • Attach the required UAMI to each Synapse workspace before deployment.
      • Deploy using environment-specific parameter files or pipeline overrides.
    • Option 2: Deploy LS & Credential Separately
      • Remove the Dataverse LS and Credential from Synapse Studio so they’re excluded from the published template.
      • Deploy the main workspace template with DeleteArtifactsNotInTemplate: false.
      • Deploy the LS and Credential using a separate ARM/Bicep template with correct environment values.

    Best practices:

    • Always attach the UAMI to the workspace before deploying the Credential.
    • Use incremental deployment mode and avoid manual edits to generated templates.
    • Keep artifact names consistent across environments.
    • Document your deployment process for the team.

    References:

    If the problem persists, feel free to mention it in the comment section.


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.