az monitor app-insights query --app $ApplicationId --analytics-query $query --offset 1d | ConvertFrom-Json is failing with error in PowerShell script.
az : ERROR: Error occurred in request., SSLError: HTTPSConnectionPool(host='api.applicationinsights.io', port=443): Max retries exceeded with url:
/v1/apps/e****-d-4-9-51*****/query (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local
issuer certificate (_ssl.c:997)')))
At line:6 char:17
CategoryInfo : NotSpecified: (ERROR: Error oc..._ssl.c:997)'))):String) [], RemoteException
FullyQualifiedErrorId : NativeCommandError
Certificate verification failed. This typically happens when using Azure CLI behind a proxy that intercepts traffic with a self-signed certificate. Please add this certificate to
the trusted CA bundle. More info: https://docs.microsoft.com/cli/azure/use-cli-effectively#work-behind-a-proxy.
Cannot index into a null array.
At line:7 char:5
$impactedRows = $response.tables[0];
az monitor app-insights query --app $ApplicationId --analytics-query $query --offset 1d | ConvertFrom-Json is failing with error in PowerShell script. az : ERROR: Error occurred in request., SSLError: HTTPSConnectionPool(host='api.applicationinsights.io', port=443): Max retries exceeded with url: /v1/apps/e****-d-4-9-51*****/query (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)'))) At line:6 char:17
... $response = az monitor app-insights query --app $ApplicationId --anal ...
CategoryInfo : InvalidOperation: (:) [], RuntimeException FullyQualifiedErrorId : NullArray