Azure / Azure/azure-cli

"az network private-endpoint-connection approve" - 'NoneType' object is not subscriptable

Open
#24,196 1 comment 0 reactions 1 assignee Claimed by @necusjz View on GitHub
act-quality-productivity-squad Auto-Assign Azure CLI Team customer-reported feature-request Network
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

I am trying to automate the approval of private-endpoint-connection in AZ CLI for my WebApp but receiving
**'NoneType' object is not subscriptable**

I also used the full string instead of a variable to no avail

```
$ az --version
azure-cli 2.41.0

core 2.41.0
telemetry 1.0.8

Dependencies:
msal 1.20.0b1
azure-mgmt-resource 21.1.0b1
```

**To Verify**
```
PROJECT_RG=RGNAME
PROJECT_WEBAPP_NAME=WEBAPPNAME

PROJECT_WEBAPP_PEID=$(az network private-endpoint-connection list --name $PROJECT_WEBAPP_NAME --resource-group $PROJECT_RG --type Microsoft.Web/sites --query "[?properties.privateLinkServiceConnectionState.status == 'Pending'].id" -o tsv)
echo $PROJECT_WEBAPP_PEID

az network private-endpoint-connection approve --id $PROJECT_WEBAPP_PEID --description "Approved"
```

This is very similar to the error observed here
https://github.com/Azure/azure-cli/issues/20752

Thanks in advance

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.