How can I unsubscribe a azure synapse trigger when I get a Bad Request error

Richard B Admin 0 Reputation points
2025-02-20T17:15:10.4833333+00:00

Running azure-cli command generates error:

  • Operation returned an invalid status 'Bad Request'
az synapse trigger unsubscribe-from-event --workspace-name agr-synapse-wp-prod --name NetSuiteImport_Customer
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.
5,200 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Pradeep Kommaraju 305 Reputation points Microsoft Employee
    2025-02-20T17:50:49.62+00:00

    Hello Richard .

    To resolve a "Bad Request" error when attempting to unsubscribe an Azure Synapse trigger, ensure the trigger is in a stopped state before proceeding.

    Follow these steps:

    • Verify the Trigger's State:

    Check the current state of your trigger:

    az synapse trigger show --workspace-name agr-synapse-wp-prod --name NetSuiteImport_Customer

    Check the properties.runtimeState in the output. If it's "Started," you'll need to stop the trigger.

    • Stop the Trigger:

    To stop the trigger, execute:

    az synapse trigger stop --workspace-name agr-synapse-wp-prod --name NetSuiteImport_Customer

    Ensure the operation completes successfully.

    • Unsubscribe from the Event:

    Once the trigger is stopped, proceed to unsubscribe:

    Feel free to reach out if you have any further questions, and if this answer helped resolve your issue, kindly mark it as accepted.

    Thanks,
    Pradeep

    0 comments No comments

  2. Richard B Admin 0 Reputation points
    2025-02-20T18:21:23.16+00:00

    I was able to run the azure-cli command with the --debug flag to get more information about the problem.

     ... cannot perform delete operation because following scope(s) are locked: ...
    

    It appears there is a lock (AzureBackupProtectionLock) on the blob resource folder that the trigger is monitoring for file create status which is preventing the unsubscribe feature.


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.