Azure / Azure/azure-powershell

New-AzSentinelDataConnector asking for TenantId?

Open
#20,947 5 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad bug customer-reported SecurityInsights Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Description

I want to create a dataconnector for AzureSecurityCenter. When I use the cmdlet, I get an error that it can't find TenantId in the @PSBoundParameters. If I add the TenantId, I still get the same error.

### Issue script & Debug output

```PowerShell
New-AzSentinelDataConnector: C:\Program Files\WindowsPowerShell\Modules\Az.SecurityInsights\3.0.1\custom\New-AzSentinelDataConnector.ps1:701:70
Line |
701 | … urityInsights.internal\New-AzSentinelDataConnector @PSBoundParameters
| ~~~~~~~~~~~~~~~~~~
| A parameter cannot be found that matches parameter name 'TenantId'.

With TenantId:

New-AzSentinelDataConnector -ResourceGroupName $WorkspaceRg -WorkspaceName $WorkspaceName -Kind 'AzureSecurityCenter' -Alerts Enabled -SubscriptionId $SubscriptionId -TenantId 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
New-AzSentinelDataConnector: C:\Program Files\WindowsPowerShell\Modules\Az.SecurityInsights\3.0.1\custom\New-AzSentinelDataConnector.ps1:701:70
Line |
701 | … urityInsights.internal\New-AzSentinelDataConnector @PSBoundParameters
| ~~~~~~~~~~~~~~~~~~
| A parameter cannot be found that matches parameter name 'TenantId'.
```

### Environment data

```PowerShell
-
```

### Module versions

```PowerShell
Recently upgraded to Az 9.4.0
3.0.1 Az.SecurityInsights
```

### Error output

```PowerShell
Message : A parameter cannot be found that matches parameter name 'TenantId'.
StackTrace : at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at Microsoft.PowerShell.Executor.ExecuteCommandHelper(Pipeline tempPipeline, Exception& exceptionThrown, ExecutionOptions options)
Exception : System.Management.Automation.ParameterBindingException
InvocationInfo : {New-AzSentinelDataConnector}
Line : Az.SecurityInsights.internal\New-AzSentinelDataConnector @PSBoundParameters

Position : At C:\Program Files\WindowsPowerShell\Modules\Az.SecurityInsights\3.0.1\custom\New-AzSentinelDataConnector.ps1:701 char:70
+ … urityInsights.internal\New-AzSentinelDataConnector @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~
HistoryId : 29
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.