Skip to content

WebApp:az webapp config ssl list not returning list of certificates on the resource group #18216

@mkunze8187

Description

@mkunze8187

using the command "az webapp config ssl list --resource-group returns an empty array when there is a certificate imported to that resource group.

From my desktop:

PS C:\WINDOWS\system32> az webapp config ssl list -g stage-fuse-practices-api-rg
[]

Output using the --debug flag:

az : DEBUG: cli.knack.cli: Command arguments: ['webapp', 'config', 'ssl', 'list', '-g', 'stage-fuse-practices-api-rg', '--debug']
At line:1 char:1
+ az webapp config ssl list -g stage-fuse-practices-api-rg --debug
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (DEBUG: cli.knac...rg', '--debug']:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
DEBUG: cli.knack.cli: __init__ debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x03C15220>, <function OutputProducer.on_global_arguments at 0x03D900B8>, 
<function CLIQuery.on_global_arguments at 0x03DA6C88>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'webapp': ['azure.cli.command_modules.appservice']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands
DEBUG: cli.azure.cli.core: appservice                0.217        62       221
DEBUG: cli.azure.cli.core: Total (1)                 0.217        62       221
DEBUG: cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
DEBUG: cli.azure.cli.core: Loading extensions:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
DEBUG: cli.azure.cli.core: Total (0)                 0.000         0         0  
DEBUG: cli.azure.cli.core: Loaded 62 groups, 221 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command  : webapp config ssl list
DEBUG: cli.azure.cli.core: Command table: webapp config ssl list
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x040FF148>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\mkunze\.azure\commands\2021-05-25.11-42-54.webapp_config_ssl_list.6116.log'.
INFO: az_command_data_logger: command args: webapp config ssl list -g {} --debug
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x041452B0>, <function 
register_global_query_examples_argument.<locals>.register_query_examples at 0x04156928>]
DEBUG: cli.azure.cli.core.util: attempting to read file C:\Program Files (x86)\Microsoft 
SDKs\Azure\CLI2\lib\site-packages\azure\cli\command_modules\appservice\resources\WindowsFunctionsStacks.json as utf-8-sig
DEBUG: cli.azure.cli.core.util: attempting to read file C:\Program Files (x86)\Microsoft 
SDKs\Azure\CLI2\lib\site-packages\azure\cli\command_modules\appservice\resources\LinuxFunctionsStacks.json as utf-8-sig
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x04156970>, <function 
register_cache_arguments.<locals>.add_cache_arguments at 0x04156A00>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x03D90100>, <function CLIQuery.handle_query_parameter at 0x03DA6CD0>, 
<function register_global_query_examples_argument.<locals>.handle_example_parameter at 0x04145340>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x041569B8>]
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=WebSiteManagementClient
DEBUG: cli.azure.cli.core.adal_authentication: AdalAuthentication.get_token invoked by Track 2 SDK with scopes=('https://management.core.windows.net//.default',)
DEBUG: cli.azure.cli.core._profile: Retrieving token from ADAL for resource 'https://management.core.windows.net/'
DEBUG: cli.azure.cli.core.util: attempting to read file C:\Users\mkunze\.azure\accessTokens.json as utf-8-sig
DEBUG: adal-python: a55198d6-f811-4da2-8c9b-3a2c3397aad3 - Authority:Performing instance discovery: ...
DEBUG: adal-python: a55198d6-f811-4da2-8c9b-3a2c3397aad3 - Authority:Performing static instance discovery
DEBUG: adal-python: a55198d6-f811-4da2-8c9b-3a2c3397aad3 - Authority:Authority validated via static instance discovery
DEBUG: adal-python: a55198d6-f811-4da2-8c9b-3a2c3397aad3 - TokenRequest:Getting token from cache with refresh if necessary.
DEBUG: adal-python: a55198d6-f811-4da2-8c9b-3a2c3397aad3 - CacheDriver:finding with query keys: {'_clientId': '...', 'userId': '...'}
DEBUG: adal-python: a55198d6-f811-4da2-8c9b-3a2c3397aad3 - CacheDriver:Looking for potential cache entries: {'_clientId': '...', 'userId': '...'}
DEBUG: adal-python: a55198d6-f811-4da2-8c9b-3a2c3397aad3 - CacheDriver:Found 5 potential entries.
DEBUG: adal-python: a55198d6-f811-4da2-8c9b-3a2c3397aad3 - CacheDriver:Resource specific token found.
DEBUG: adal-python: a55198d6-f811-4da2-8c9b-3a2c3397aad3 - CacheDriver:Returning token from cache lookup, AccessTokenId: b'+CcU3iWHYGS0gszgFj2q/pWB48gMQl6eZXap5AYUgTo=', RefreshTokenId: 
b'WSfEqit15pju0vGfk6Y8i3cbnwZlee8oyz030Ek+D7k='
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 
'https://management.azure.com/subscriptions/5a0b4c30-abbf-484c-bb76-47476c88862b/resourceGroups/stage-fuse-practices-api-rg/providers/Microsoft.Web/certificates?api-version=2020-09-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '40a0ac4c-bd78-11eb-8eb7-94659c0dbc26'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'webapp config ssl list'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '-g --debug'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.23.0 (MSI) azsdk-python-azure-mgmt-web/2.0.0 Python/3.8.9 (Windows-10-10.0.18362-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET 
/subscriptions/5a0b4c30-abbf-484c-bb76-47476c88862b/resourceGroups/stage-fuse-practices-api-rg/providers/Microsoft.Web/certificates?api-version=2020-09-01 HTTP/1.1" 200 None
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Transfer-Encoding': 'chunked'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Encoding': 'gzip'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Vary': 'Accept-Encoding'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '944e0f17-0824-42cb-a20e-aa52310ac913'
DEBUG: cli.azure.cli.core.sdk.policies:     'Server': 'Microsoft-IIS/10.0'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-AspNet-Version': '4.0.30319'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Powered-By': 'ASP.NET'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '11999'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '7ff2e2d2-a31c-4a54-8a0a-3b876e61cee6'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'NORTHCENTRALUS:20210525T164255Z:7ff2e2d2-a31c-4a54-8a0a-3b876e61cee6'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Tue, 25 May 2021 16:42:55 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"value":[],"nextLink":null,"id":null}
DEBUG: cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x04134BF8>, <function _x509_from_base64_to_hex_transform at 0x04134C40>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnFilterResult []
DEBUG: cli.knack.cli: Event: Cli.SuccessfulExecute []
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x040FF268>]
INFO: az_command_data_logger: exit code: 0
INFO: cli.__main__: Command ran in 1.278 seconds (init: 0.221, invoke: 1.056)
INFO: telemetry.save: Save telemetry record of length 2934 in cache
INFO: telemetry.check: Returns Positive.
INFO: telemetry.main: Begin creating telemetry upload process.
INFO: telemetry.process: Creating upload process: "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files (x86)\Microsoft 
SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry\__init__.pyc C:\Users\mkunze\.azure"
INFO: telemetry.process: Return from creating process
INFO: telemetry.main: Finish creating telemetry upload process.
[]

I am seeing the same issues from the cloud shell in the Azure Portal.

Azure Version (same versions on both my desktop and the cloud shell session):

{
  "azure-cli": "2.23.0",
  "azure-cli-core": "2.23.0",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
    "ai-examples": "0.2.5",
    "application-insights": "0.1.13",
    "ssh": "0.1.5"
  }
}

An interesting note from testing in the cloud shell -- if I run the az webapp config ssl list, I get an empty array, then in the same shell session run Get-AzWebAppCertificate on the same group, I see the list of my certificates, then I run the az webapp config ssl list again and I now see my list of certificates for this resource group until the cloud shell session ends. If I try the same steps on another resource group in the same shell I see the same behaviour. See the attached image.

screencapture-portal-azure-2021-05-25-11_09_56


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Labels

Service AttentionThis issue is responsible by Azure service team.Web Appsaz webapp

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions