Azure / Azure/azure-powershell

The "Status" property of "PSTriggerRun" from Get-AzSynapseTriggerRun shows type "Microsoft.Azure.Commands.Synapse.Models.PSTriggerRunStatus" instead of value

Open
#25,119 1 comment 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad bug customer-reported Synapse
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

### Description

I wanted to check the status of my synapse trigger run using cmdlet "Get-AzSynapseTriggerRun" from "Az.Synapse", but the "Status" property shows the type of the property instead of the real value "Microsoft.Azure.Commands.Synapse.Models.PSTriggerRunStatus"
Azure CLI is working correctly.

### Issue script & Debug output

```PowerShell
Select-AzSubscription -SubscriptionId "xx"
$rgName = "rg-yy"
$wsName = "synapseworkspace"
$trigName = "Trigger"

$today = Get-Date
$yesterday = $today.AddDays(-1)

$ws = Get-AzSynapseWorkspace -Name $wsName -ResourceGroupName $rgName
$trigRun = $ws | Get-AzSynapseTriggerRun -Name $trigName -RunStartedAfter $yesterday -RunStartedBefore $today

$trigRun.Status
# It returns => Microsoft.Azure.Commands.Synapse.Models.PSTriggerRunStatus
# With zz cli
az synapse trigger-run query-by-workspace --workspace-name $wsName --filters operand="TriggerName" operator="Equals" values="$($trigName)" --last-updated-after $yesterday.ToString("o") --last-updated-before $today.ToString("o") --query "value[0].status"
# we get "Succeeded"
```

### Environment data

```PowerShell
$PSVersionTable

Name Value
---- -----
PSVersion 7.4.2
PSEdition Core
GitCommitId 7.4.2
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```

### Module versions

```PowerShell
Get-Module Az*

ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 3.0.0 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefau…
Script 3.0.8 Az.Synapse {Add-AzSynapseDataFlowDebugSessionPackage, Add-AzSynapseTriggerSub…
```

### Error output

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with Get-AzSynapseTriggerRun and inspect the Status property returned by the Az.Synapse module, particularly PSTriggerRunStatus. Compare it with the Azure CLI query shown in the report; done means the PowerShell property exposes the actual status value such as Succeeded rather than the type name.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, powershell
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.