Skip to content

az webapp config ssl delete returns "Certificate for thumbprint ... not found" #28722

@fifron

Description

@fifron

Describe the bug

az webapp config ssl delete is not able to delete a certificate if you have more certificates. In our case we have 143 managed certificates.

az webapp config ssl show is able to succesfully find my certificate (I want to delete), but az webapp config ssl delete is not able to delete it.

I used --debug and if I understand well it is because az webapp config ssl delete works:

  • obtains access_token
  • via https://management.azure.com:443 "GET /subscriptions/*/resourceGroups//providers/Microsoft.Web/certificates?api-version=2023-01-01 HTTP/1.1" 200 reads "all" certificates
  • there is a problem, because GET returns only (first) 64 certificates and my certificate is not here
  • command returns with "Certificate for thumbprint ... not found"

So I expected:

  • GET certificates doesn't return all certificates. Is there some paging?
  • az webapp config ssl delete doesn't count with this situation. Reading certificates has to continue in next iteration?

Related command

THUMBPRINT=$(az webapp config ssl show --resource-group $RESOURCE_GROUP --certificate-name $CUSTOM_DOMAIN --query "thumbprint" -o tsv)
echo THUMBPRINT=$THUMBPRINT
az webapp config ssl delete --certificate-thumbprint $THUMBPRINT --resource-group $RESOURCE_GROUP

Errors

THUMBPRINT=E29B...
ERROR: Certificate for thumbprint 'E29B...' not found

Issue script & Debug output

THUMBPRINT=$(az webapp config ssl show --resource-group $RESOURCE_GROUP --certificate-name $CUSTOM_DOMAIN --query "thumbprint" -o tsv)
az webapp config ssl delete --certificate-thumbprint $THUMBPRINT --resource-group $RESOURCE_GROUP

Expected behavior

The certificate is deleted.

Environment Summary

{
"azure-cli": "2.59.0",
"azure-cli-core": "2.59.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}

Additional context

No response

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.Web Appsaz webappact-observability-squadapp-service-certs-domainsbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions