WebSiteManagementClient.web_apps.list_by_resource_group (and az webapp list) silently under-reports results on resource groups with 100+ App Services
Maintainer antworten meist innerhalb von 1 Tag
@msyyc arbeitet bereits daran.
Seit 17.9.2026.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
Rechercherichtung
Beginne damit, die Abweichung mit WebSiteManagementClient.web_apps.list_by_resource_group() und az webapp list zu reproduzieren, und vergleiche dann ihre Anzahl mit az resource list für dieselbe Ressourcengruppe. Untersuche das Auflistungs- und Paginierungsverhalten von Microsoft.Web/sites; abgeschlossen ist die Untersuchung, wenn sowohl SDK als auch CLI alle vorhandenen App Services ohne stilles Abschneiden zurückgeben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Package Name: azure-mgmt-web
Package Version: 11.0.0
Operating System: Windows 11
Python Version: 3.13
Describe the bug
WebSiteManagementClient.web_apps.list_by_resource_group() silently under-reports results on a resource group with 100+ App Services, returning only 32 of 101 existing resources with no error, exception, or indication that results were truncated. The Azure CLI command az webapp list (against the same resource group, same identity) exhibits the identical behavior, suggesting both share the same underlying listing logic. Azure Resource Graph and az resource list, queried against the same resource group, correctly return all 101.
To Reproduce
Steps to reproduce the behavior:
-
az resource list -g <resource-group> --resource-type Microsoft.Web/sites --query "length(@)" -
az resource list -g <resource-group> --resource-type Microsoft.Web/sites --query "[].kind" -o tsv | sort | uniq - c - returns all the resources count
Code which is not working:
from azure.identity import DefaultAzureCredential
from azure.mgmt.web import WebSiteManagementClient
credential = DefaultAzureCredential()
client = WebSiteManagementClient(credential, subscription_id="")
apps = list(client.web_apps.list_by_resource_group(""))
print(len(apps))
Expected behavior
list_by_resource_group() should return all App Services in the resource group, matching the count returned by Azure Resource Graph (Resources | where type =~ 'microsoft.web/sites' | where resourceGroup =~ 'bic-web-apps-rg') and az resource list --resource-type Microsoft.Web/sites, both of which correctly.
Additional context
Ruled out RBAC/permission scoping: same identity used for the CLI, the SDK, the Azure portal, and Resource Graph
Ruled out kind-based filtering (e.g. Function Apps or Logic Apps Standard being excluded from web-app-specific listings):
Workaround in use: querying Azure Resource Graph directly (bypassing list_by_resource_group entirely) returns the correct, complete count.
Suspected root cause: a pagination/continuation-token handling issue specific to the Microsoft.Web/sites list endpoint, shared by both the CLI and the Python SDK.
If this doesn't reproduce on a freshly created test resource group, it may be specific to something about our subscription or data rather than a universal SDK bug —
happy to open an Azure Support case and share the x-ms-correlation-request-id / x-ms-request-id from a failing call (visible via az webapp list --debug) so the request can be traced server-side without needing access to our environment.
- Vorherrschende Sprache
- Python
- Sterne
- 5.6k
- Forks
- 3.4k
- Ø Merge
- 1 T. 22 Std.
- Gemergte PRs (30 T.)
- 189
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Azure/azure-sdk-for-python
-
needs-triage
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
Azure/azure-sdk-for-python#50155 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Teams Chatbot]: next-mypy install 404s should point to CFS auth or --pypi workaroundEvtl. vergeben @jianingwang123 hat das vor 17 Tagen übernommen. Offenneeds-triage
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Azure/azure-sdk-for-python#49886 · 1 Kommentar · 2 Reaktionen · 2 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 1 Tag
-
[AI Projects] AIProjectInstrumentor: non-streamed responses.create raises AttributeError ('NonRecordingSpan' object has no attribute 'attributes') when the span is not sampledEvtl. vergeben @14H034160212 hat das vor 19 Tagen übernommen. OffenAI Projects Client customer-reported question
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Azure/azure-sdk-for-python#49854 · 2 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
azure-eventhub migration guide: legacy checkpoint sample writes "None" metadata for partitions that were never checkpointedEvtl. vergeben @hidingmyname hat das vor 27 Tagen übernommen. OffenClient customer-reported Event Hubs needs-team-attention question Service Attention
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Azure/azure-sdk-for-python#49723 · 2 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Scheduled test pipelines fail at the Analyze_Test stage due to date formattingEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. OffenEngSys
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Azure/azure-sdk-for-python#49614 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in Azure/azure-sdk-for-python
Ähnliche Issues
-
🧫10장-투향
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
hyunjimoon/golden-cage-book#188 ·
-
agent/scanner bug stage/010-actionable
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
torch-spyre/spyre-inference#1812 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bug: fenced drafts inside <think> tags break parsing or are returned instead of the answerEvtl. vergeben @aad1tyaaaaa hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
google/langextract#639 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[oblt-aw][autodoc] Update autodoc routing docs for relative in-repo lock usesEvtl. vergeben @github-actions hat das heute übernommen. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 87/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag