Closed AntoineJo closed 1 year ago
Hi @AntoineJo , please confirm the resource provider is registered successfully. Looks the resource provider is not registered in your location and api version. You can use Get-AzResourceProvider to verify the registerion and use Register-AzResourceProvider to register.
Thank you for your feedback. This has been routed to the support team for assistance.
@AntoineJo Thanks for reaching out to us and reporting this issue. Could you please check if the below providers are registered for your subscription ?
Connect-AzAccount
Select-AzSubscription -SubscriptionId 'XXXX-XXXX-XXXX-XXX'
Get-AzResourceProvider -ProviderNamespace Microsoft.OperationalInsights Get-AzResourceProvider -ProviderNamespace Microsoft.SecurityInsights
If it is not registered, please run the below command, to register:
Register-AzResourceProvider -ProviderNamespace Microsoft.OperationalInsights
Register-AzResourceProvider -ProviderNamespace Microsoft.SecurityInsights
Awaiting your reply.
As talked with AntoineJo, seems only location eastus
is not avaiable for Microsoft.SecurityInsights
@AntoineJo The below command which shows the available location for Microsoft.SecurityInsights
resource provider.
Get-AzLocation | Where-Object {$_.Providers -contains "Microsoft.SecurityInsights"} | Select Location
Location
--------
northeurope
swedencentral
uksouth
westeurope
francecentral
germanywestcentral
norwayeast
switzerlandnorth
francesouth
norwaywest
switzerlandwest
ukwest
Could you please use one of these available locations and test ? Awaiting your reply.
@AntoineJo I wanted to do quick follow-up to check if you had a chance to look at my above comment. Please let us know if you had any updates on this. Awaiting your reply.
@AntoineJo The action is pending on you to test the above plan. If you need any further assistance on this issue in future, please feel free to reopen this thread. We would be happy to help.
Hi @navba-MSFT same thing with a workplace in westeurope
PS C:\Users[account]> Get-AzLocation | Where-Object {$_.Providers -contains "Microsoft.SecurityInsights"} | Select Location
northeurope swedencentral uksouth westeurope francecentral germanywestcentral norwayeast switzerlandnorth francesouth norwaywest switzerlandwest ukwest
PS C:\Users[account]> New-AzSentinelAlertRule -ResourceGroupName cybersoc -WorkspaceName "weutest" -Kind NRT -Enabled -DisplayName "Tutu" -Severity Low -Query "SigninLogs | where UserDisplayName == 'toto'"
Etag Kind Name SystemDataCreatedAt SystemDataCreatedBy SystemD ataCrea tedByTy pe
"4f000699-0000-0d00-0000-643d08a40000" NRT 1191bc50-7398-4fb0-aa65-af5da2e676cc
PS C:\Users[account]> $rule = get-azsentinelAlertRule -ResourceGroupName cybersoc -WorkspaceName weutest | where DisplayName -eq 'tutu' PS C:\Users[account]> update-AzSentinelAlertRule -RuleId $rule.Id -EntityMapping $entityAccount -ResourceGroupName cybersoc -WorkspaceName weutest -NRT DEBUG: 10:54:50 AM - GetAzureRMContextCommand end processing. DEBUG: 10:54:50 AM - GetAzureRMContextCommand end processing. DEBUG: [CmdletBeginProcessing]: Starting command DEBUG: CmdletBeginProcessing: DEBUG: CmdletProcessRecordStart: DEBUG: CmdletGetPipeline: DEBUG: CmdletBeforeAPICall: DEBUG: URLCreated: /subscriptions/dfgdfgdf/resourceGroups/cybersoc/providers/Microsoft.OperationalInsights/workspaces/weutest/providers/Microsoft.SecurityInsights/alertRules/%2Fsubscriptions%2Fdfgdfg%2FresourceGroups%2Fcybersoc%2Fproviders%2FMicrosoft.OperationalInsights%2Fworkspaces%2Fweutest%2Fproviders%2FMicrosoft.SecurityInsights%2FalertRules%2F1191bc50-7398-4fb0-aa65-af5da2e676cc?api-version=2021-09-01-preview DEBUG: RequestCreated: /subscriptions/dfgdfgdfg/resourceGroups/cybersoc/providers/Microsoft.OperationalInsights/workspaces/weutest/providers/Microsoft.SecurityInsights/alertRules/%2Fsubscriptions%2Fdfgdfgdfg%2FresourceGroups%2Fcybersoc%2Fproviders%2FMicrosoft.OperationalInsights%2Fworkspaces%2Fweutest%2Fproviders%2FMicrosoft.SecurityInsights%2FalertRules%2F1191bc50-7398-4fb0-aa65-af5da2e676cc?api-version=2021-09-01-preview DEBUG: HeaderParametersAdded: DEBUG: ============================ HTTP REQUEST ============================
HTTP Method: GET
Headers: x-ms-unique-id : 9 x-ms-client-request-id : b4b5dbdb-9cb1-4812-927f-464f6be4b16e CommandName : Az.SecurityInsights\Get-AzSentinelAlertRule FullCommandName : Get-AzSentinelAlertRule_Get ParameterSetName : __AllParameterSets User-Agent : AzurePowershell/v9.6.0,PSVersion/v7.3.3,Az.SecurityInsights/3.0.1
Body:
DEBUG: BeforeCall: DEBUG: ============================ HTTP RESPONSE ============================
Status Code: BadRequest
Headers: Cache-Control : no-cache Pragma : no-cache x-ms-failure-cause : gateway x-ms-request-id : a69a04f7-7916-4925-a8a7-d256e2908022 x-ms-correlation-request-id : a69a04f7-7916-4925-a8a7-d256e2908022 x-ms-routing-request-id : FRANCECENTRAL:20230417T085449Z:a69a04f7-7916-4925-a8a7-d256e2908022 Strict-Transport-Security : max-age=31536000; includeSubDomains X-Content-Type-Options : nosniff Date : Mon, 17 Apr 2023 08:54:48 GMT
Body: { "error": { "code": "NoRegisteredProviderFound", "message": "No registered resource provider found for location 'westeurope' and API version '2021-09-01-preview' for type 'workspaces'. The supported api-versions are '2015-03-20, 2015-11-01-preview, 2017-01-01-preview, 2017-03-03-preview, 2017-03-15-preview, 2017-04-26-preview, 2020-03-01-preview, 2020-08-01, 2020-10-01, 2021-06-01, 2021-03-01-privatepreview, 2021-12-01-preview, 2022-10-01'. The supported locations are 'eastus, westeurope, southeastasia, australiasoutheast, westcentralus, japaneast, uksouth, centralindia, canadacentral, westus2, australiacentral, australiaeast, francecentral, koreacentral, northeurope, centralus, eastasia, eastus2, southcentralus, northcentralus, westus, ukwest, southafricanorth, brazilsouth, switzerlandnorth, switzerlandwest, germanywestcentral, australiacentral2, uaecentral, uaenorth, japanwest, brazilsoutheast, norwayeast, norwaywest, francesouth, southindia, koreasouth, jioindiacentral, jioindiawest, qatarcentral, canadaeast, westus3, swedencentral'." } }
DEBUG: ResponseCreated:
DEBUG: BeforeResponseDispatch:
Get-AzSentinelAlertRule_Get: C:\Users[account]\OneDrive - WXXXX\Documents\PowerShell\Modules\Az.SecurityInsights\3.0.1\custom\Update-AzSentinelAlertRule.ps1:449
Line |
449 | $AlertRule = Az.SecurityInsights\Get-AzSentinelAlertRule …
| ~~~~~~~~~~~~~
| No registered resource provider found for location 'westeurope' and API version '2021-09-01-preview' for type
| 'workspaces'. The supported api-versions are '2015-03-20, 2015-11-01-preview, 2017-01-01-preview, 2017-03-03-preview,
| 2017-03-15-preview, 2017-04-26-preview, 2020-03-01-preview, 2020-08-01, 2020-10-01, 2021-06-01,
| 2021-03-01-privatepreview, 2021-12-01-preview, 2022-10-01'. The supported locations are 'eastus, westeurope,
| southeastasia, australiasoutheast, westcentralus, japaneast, uksouth, centralindia, canadacentral, westus2,
| australiacentral, australiaeast, francecentral, koreacentral, northeurope, centralus, eastasia, eastus2, southcentralus,
| northcentralus, westus, ukwest, southafricanorth, brazilsouth, switzerlandnorth, switzerlandwest, germanywestcentral,
| australiacentral2, uaecentral, uaenorth, japanwest, brazilsoutheast, norwayeast, norwaywest, francesouth, southindia,
| koreasouth, jioindiacentral, jioindiawest, qatarcentral, canadaeast, westus3, swedencentral'.
DEBUG: Finally:
DEBUG: CmdletAfterAPICall:
DEBUG: [CmdletProcessRecordAsyncEnd]: Finish HTTP process
DEBUG: CmdletProcessRecordAsyncEnd:
DEBUG: CmdletProcessRecordEnd:
Update-AzSentinelAlertRule: C:\Users[account]\OneDrive - WWXXXXX\Documents\PowerShell\Modules\Az.SecurityInsights\3.0.1\custom\Update-AzSentinelAlertRule.ps1:826
Line |
826 | … curityInsights.internal\Update-AzSentinelAlertRule @PSBoundParameters
| ~~~~~~
| Cannot bind argument to parameter 'AlertRule' because it is null.
Hi, how come that this has been closed? I still have the same problem as creator of this issue: Resource Provider Microsoft.SecurityInsights and Microsoft.OperationalInsights are registered. When I check the API versions on SecurityInsights I can see that "2021-09-01-preview" is available but on OperationalInsights it is unavailable on resource type "workspaces" like mentioned in the picture.
Description
I'm trying to update the entity mapping of an analytic rules but I get the below error: PS C:\Users\xxxxxx> update-AzSentinelAlertRule -RuleId $rule.Id -EntityMapping $entityDevice -ResourceGroupName cybersoc -WorkspaceName cybersecuritysoc -NRT WARNING: Get-AzSentinelAlertRule_Get is not found. The most similar Azure PowerShell command is: Get-AzSentinelAlertRule Get-AzSentinelAlertRule_Get: C:\Users\xxxxxx\OneDrive - xxxxxx\Documents\PowerShell\Modules\Az.SecurityInsights\3.0.1\custom\Update-AzSentinelAlertRule.ps1:449 Line | 449 | $AlertRule = Az.SecurityInsights\Get-AzSentinelAlertRule … |
~~~~~~~~~~~~~ | No registered resource provider found for location 'eastus' and API version '2021-09-01-preview' for type 'workspaces'. The supported api-versions are '2015-03-20, 2015-11-01-preview, 2017-01-01-preview, 2017-03-03-preview, 2017-03-15-preview, 2017-04-26-preview, | 2020-03-01-preview, 2020-08-01, 2020-10-01, 2021-06-01, 2021-03-01-privatepreview, 2021-12-01-preview, 2022-10-01'. The supported locations are 'eastus, westeurope, southeastasia, australiasoutheast, westcentralus, japaneast, uksouth, centralindia, canadacentral, westus2, | australiacentral, australiaeast, francecentral, koreacentral, northeurope, centralus, eastasia, eastus2, southcentralus, northcentralus, westus, ukwest, southafricanorth, brazilsouth, switzerlandnorth, switzerlandwest, germanywestcentral, australiacentral2, uaecentral, | uaenorth, japanwest, brazilsoutheast, norwayeast, norwaywest, francesouth, southindia, koreasouth, jioindiacentral, jioindiawest, qatarcentral, canadaeast, westus3, swedencentral'. Update-AzSentinelAlertRule: C:\Users\xxxxxx\OneDrive - xxxxxxx\Documents\PowerShell\Modules\Az.SecurityInsights\3.0.1\custom\Update-AzSentinelAlertRule.ps1:826 Line | 826 | … curityInsights.internal\Update-AzSentinelAlertRule @PSBoundParameters |~~~~~~ | Cannot bind argument to parameter 'AlertRule' because it is null.Issue script & Debug output
Environment data
Module versions
Error output