Share via

Stop-AzSynapseTrigger powershell command no longer working

- 51 Reputation points Microsoft Employee
2023-02-01T01:50:36.0833333+00:00

Hi,

Recently the Stop-AzSynapseTrigger powershell command has stopped working for us.

It's giving the following error:

PS C:\Users\user1>  Stop-AzSynapseTrigger -WorkspaceName "workspace-name" -Name "my-trigger"
Stop-AzSynapseTrigger : {}
At line:1 char:2
+  Stop-AzSynapseTrigger -WorkspaceName "workspace-name" -Name "my- ...
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Stop-AzSynapseTrigger], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Synapse.StopAzureSynapseTrigger
 

It was working fine until about 1 month back, but now its throwing this error.

Other powershell commands like Stop-AzSynapsePipelineRun, Invoke-AzSynapsePipeline, etc are working fine.

Please suggest the fix.

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.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

Answer accepted by question author

Bhargava-MSFT 31,361 Reputation points Microsoft Employee Moderator
2023-02-01T20:17:04.7466667+00:00

Hello @Follow,

Welcome to the MS Q&A platform.

The product group has confirmed that this is a bug currently being fixed with priority.

As a workaround, you may use REST API.

Here is the REST API code for your reference:

# Get token for data plane
$token = Get-AzAccessToken -ResourceUrl https://dev.azuresynapse.net
$authHeader = @{
    'Content-Type'  = 'application/octet-stream'
    'Authorization' = 'Bearer ' + $token.Token
}

$workspaceName = "<your-worksapce-name>"
$triggerName = "<your-trigger-name>"

# start trigger
Invoke-WebRequest -Method POST -Uri "https://${workspaceName}.dev.azuresynapse.net/triggers/${triggerName}/stop?api-version=2020-12-01" -Headers $authHeader

I hope this helps. Please let us know if you have any further questions.

Was this answer helpful?


3 additional answers

Sort by: Most helpful
  1. Alex Cruickshank 0 Reputation points
    2023-05-12T12:55:20.0566667+00:00

    Hi

    Any updates on this please? I am facing the same error.

    Thanks

    Was this answer helpful?


  2. Xia Li (PACTERA TECHNOLOGIES INC) 0 Reputation points Microsoft External Staff
    2023-02-16T19:59:36.0533333+00:00

    Do we have an ETA for the bug fix?

    Was this answer helpful?

    0 comments No comments

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

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.