Describe the bug
az webapp config ssl list --resource-group <resource-group> returns [] as the response,
while Get-AzWebAppCertificate -ResourceGroupName <resource-group> returns the actual certificates.
It has previously been reported, and supposedly fixed, here:
(Although my problem doesn't seem to be a caching issue as described in the first issue because running the Get-AzWebAppCertificate first, then az command doesn't make it work)
Related command
az webapp config ssl list --resource-group <resource-group>
and
Get-AzWebAppCertificate -ResourceGroupName <resource-group>
Errors
No errors, just no results.
Issue script & Debug output
I've added --debug to the az command and -Debug to the Get-AzWebAppCertificate command and noticed that Get-AzWebAppCertificate makes this request 👇 to Management API:
https://management.azure.com/subscriptions/<subscription>/resourceGroups/<resource-group>/resources?$filter=resourceType eq 'Microsoft.Web%2FCertificates'&api-version=2016-09-01
While the az command makes a different one:
https://management.azure.com/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Web/certificates?api-version=2023-01-01
So, maybe the problem is not necessarily the CLI, but that 👆 specific Management API version/request?
Expected behavior
I expect the certificates to be included in the az output.
Environment Summary
I'm running both on Cloud Shell.
> Get-Module -Name Az -ListAvailable
Directory: /usr/local/share/powershell/Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 12.1.0 Az Core,Desk
$ az --version
azure-cli 2.62.0
core 2.62.0
telemetry 1.1.0
Extensions:
ai-examples 0.2.5
front-door 1.2.0
ml 2.27.0
ssh 2.0.4
Dependencies:
msal 1.28.1
azure-mgmt-resource 23.1.1
Python location '/usr/bin/python3.9'
Extensions directory '/home/<name>/.azure/cliextensions'
Extensions system directory '/usr/lib/python3.9/site-packages/azure-cli-extensions'
Python (Linux) 3.9.19 (main, Mar 28 2024, 18:56:59)
[GCC 11.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
Certificates are Microsoft managed.
Describe the bug
az webapp config ssl list --resource-group <resource-group>returns[]as the response,while
Get-AzWebAppCertificate -ResourceGroupName <resource-group>returns the actual certificates.It has previously been reported, and supposedly fixed, here:
(Although my problem doesn't seem to be a caching issue as described in the first issue because running the
Get-AzWebAppCertificatefirst, thenazcommand doesn't make it work)Related command
az webapp config ssl list --resource-group <resource-group>and
Get-AzWebAppCertificate -ResourceGroupName <resource-group>Errors
No errors, just no results.
Issue script & Debug output
I've added
--debugto theazcommand and-Debugto theGet-AzWebAppCertificatecommand and noticed thatGet-AzWebAppCertificatemakes this request 👇 to Management API:While the
azcommand makes a different one:So, maybe the problem is not necessarily the CLI, but that 👆 specific Management API version/request?
Expected behavior
I expect the certificates to be included in the
azoutput.Environment Summary
I'm running both on Cloud Shell.
Additional context
Certificates are Microsoft managed.