WebSiteManagementClient.web_apps.list_by_resource_group (and az webapp list) silently under-reports results on resource groups with 100+ App Services
Mantenedores costumam responder em até 1 dia
@msyyc já está trabalhando nisso.
Desde 17/9/2026.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 45/100
Direção de pesquisa
Comece reproduzindo a discrepância com WebSiteManagementClient.web_apps.list_by_resource_group() e az webapp list e, em seguida, compare as contagens com az resource list para o mesmo grupo de recursos. Investigue o comportamento de listagem e paginação de Microsoft.Web/sites; considera-se concluído quando tanto o SDK quanto a CLI retornarem todos os App Services existentes sem truncamento silencioso.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 5.6k
- Forks
- 3.4k
- Merge médio
- 1d 22h
- PRs com merge (30d)
- 189
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de Azure/azure-sdk-for-python
-
needs-triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
Azure/azure-sdk-for-python#50155 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
[Teams Chatbot]: next-mypy install 404s should point to CFS auth or --pypi workaroundTalvez já em andamento @jianingwang123 assumiu há 17 dias. Abertaneeds-triage
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 72/100
Azure/azure-sdk-for-python#49886 · 1 comentário · 2 reações · 2 responsáveis ·
Mantenedores costumam responder em até 1 dia
-
[AI Projects] AIProjectInstrumentor: non-streamed responses.create raises AttributeError ('NonRecordingSpan' object has no attribute 'attributes') when the span is not sampledTalvez já em andamento @14H034160212 assumiu há 19 dias. AbertaAI Projects Client customer-reported question
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Azure/azure-sdk-for-python#49854 · 2 comentários · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
azure-eventhub migration guide: legacy checkpoint sample writes "None" metadata for partitions that were never checkpointedTalvez já em andamento @hidingmyname assumiu há 27 dias. AbertaClient customer-reported Event Hubs needs-team-attention question Service Attention
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Azure/azure-sdk-for-python#49723 · 2 comentários · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Scheduled test pipelines fail at the Analyze_Test stage due to date formattingTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. AbertaEngSys
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Azure/azure-sdk-for-python#49614 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
Todas as issues de Azure/azure-sdk-for-python
Issues semelhantes
-
🧫10장-투향
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
hyunjimoon/golden-cage-book#188 ·
-
agent/scanner bug stage/010-actionable
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
torch-spyre/spyre-inference#1812 ·
Mantenedores costumam responder em até 1 dia
-
Bug: fenced drafts inside <think> tags break parsing or are returned instead of the answerTalvez já em andamento @aad1tyaaaaa assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
google/langextract#639 ·
Mantenedores costumam responder em até 1 dia
-
[oblt-aw][autodoc] Update autodoc routing docs for relative in-repo lock usesTalvez já em andamento @github-actions assumiu hoje. Aberta
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 87/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia