Closed RTaneja23 closed 7 months ago
hmm, can you try this?
$scopeId = 'your-subscriptionId-here'
$uri = "https://management.azure.com/subscriptions/$($scopeId)/providers/Microsoft.Security/pricings?api-version=2018-06-01"
$method = 'GET'
$defenderPlansResultTest = Invoke-AzRestMethod -uri $uri -method $method
´´´
AzGovViz version 6.4.3
CodeRunPlatform Console
Describe the bug [AzAPICallErrorHandler 1.2.0] Getting Microsoft Defender for Cloud plans for Subscription: ' [quotaId:'EnterpriseAgreement_2014-09-01'] try #8; uri:"https://management.azure.com/subscriptions/b27e7e0e-d477-4a89-9fdb-c098d7c9d2a9/providers/Microsoft.Security/pricings?api-version=2018-06-01"; return: (StatusCode: '500' (InternalServerError)) <.code: ''> <.error.code: 'GeneralError'> | <.message: ''> <.error.message: 'Internal server error has occurred'> AzAPICall: exit (after 7 tries) - unhandledErrorAction: Stop
Exception: C:\Users\Rahul.Taneja\Azure-MG-Sub-Governance-Reporting\Azure-MG-Sub-Governance-Reporting\pwsh\AzGovVizParallel.ps1:5437:9
Line |
5437 | $subsToProcessInCustomDataCollectionBatch | ForEach-Object -P …
|
~~~~~~~~~~~~~ | Error - check the last console output for detailsScreenshots
Additional context The error is produced every time I run the script from local console regardless of management group ID. Please help!