Skip to content

'az network private-endpoint-connection list' doesn't return the private endpoint connection for web app slot #31887

@sanjaydebnath

Description

@sanjaydebnath

Describe the bug

We have a web app with a staging slot (example ids below).

web app id: /subscriptions//resourceGroups//providers/Microsoft.Web/sites/mysite
web app slot id: /subscriptions//resourceGroups//providers/Microsoft.Web/sites/mysite/slots/staging

We have disabled the public network & added these endpoints to AFD using private endpoint. Now we can fetch the private endpoint details by using the 'az network private-endpoint-connection list' command for the actual web app (production slot) but not for the 'staging slot' (a slot named staging).

Related command

az network private-endpoint-connection list --id $id

Errors

Even if we provide direct slot id, the command returns the private endpoint for the actual web app instead of the slot. Whereas I can see the private endpoint separately if I go to the network tab for the slot in the portal.

Issue script & Debug output

From --debug telemetry I can see its actually calling the web app & not the slot even if the id is specified....

az network private-endpoint-connection list --id /subscriptions/***/resourceGroups/***/providers/Microsoft.Web/sites/***/slots/staging --debug
cli.knack.cli: Command arguments: ['network', 'private-endpoint-connection', 'list', '--id', '/subscriptions/***/resourceGroups/***/providers/Microsoft.Web/sites/***/slots/staging', '--debug']
cli.knack.cli: __init__ debug log:
<REMOVED>
msal.telemetry: Generate or reuse correlation_id: 4f35a6f2-50c9-420c-b813-49ffc10e102f
cli.azure.cli.core.util: Request URL: 'https://management.azure.com/subscriptions/***/resourceGroups/***/providers/Microsoft.Web/sites/***?api-version=2019-08-01'
cli.azure.cli.core.util: Request method: 'GET'
cli.azure.cli.core.util: Request headers:
cli.azure.cli.core.util:     'User-Agent': 'python/3.12.8 (Windows-11-10.0.26100-SP0) AZURECLI/2.72.0'
cli.azure.cli.core.util:     'Accept-Encoding': 'gzip, deflate'
cli.azure.cli.core.util:     'Accept': '*/*'
cli.azure.cli.core.util:     'Connection': 'keep-alive'
cli.azure.cli.core.util:     'x-ms-client-request-id': '92a37603-f4aa-485b-8440-29cca87527c7'
cli.azure.cli.core.util:     'CommandName': 'network private-endpoint-connection list'
cli.azure.cli.core.util:     'ParameterSetName': '--id --debug'
cli.azure.cli.core.util:     'Authorization': 'Bearer eyJ0eXAiOiJKV...'
cli.azure.cli.core.util: Request body:
cli.azure.cli.core.util: None
<REMOVED>

Expected behavior

The command should return correct private endpoint details for actual web app vs slot

Environment Summary

azure-cli 2.72.0 *

core 2.72.0 *
telemetry 1.1.0

Extensions:
application-insights 1.2.3
front-door 1.3.0
load 2.1.0

Dependencies:
msal 1.32.3
azure-mgmt-resource 23.1.1

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\sanjayd.azure'
Extensions directory 'C:\Users\sanjayd.azure\cliextensions'

Python (Windows) 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:07:15) [MSC v.1942 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade'

Additional context

Image

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamNetworkaz network vnet/lb/nic/dns/etc...Upgradeaz upgradeact-platform-engineering-squadact-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions