Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.27k stars 3.87k forks source link

New-AzSentinelDataConnector asking for TenantId? #20947

Open Annesars90 opened 1 year ago

Annesars90 commented 1 year ago

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

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

-

Module versions

Recently upgraded to Az 9.4.0
3.0.1                 Az.SecurityInsights

Error output

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
isra-fel commented 1 year ago

Thanks for reporting. I'll redirect it to the dev team.

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @amirke.

Issue Details
### 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 ```
Author: Annesars90
Assignees: -
Labels: `Service Attention`, `bug`, `customer-reported`, `SecurityInsights`
Milestone: -
Annesars90 commented 1 year ago

Is there any update?

bishalbhandari2022 commented 1 year ago

I am also having the same issue with az.securityinsights Module 3.0.0 and 3.0.1. Is there any update?