`az webapp config ssl import` fails: AttributeError: 'GraphClient' object has no attribute 'service_principals'
See original GitHub issueDescription
Command Name
az webapp config ssl import
Errors:
The command failed with an unexpected error. Here is the traceback:
'GraphClient' object has no attribute 'service_principals'
Traceback (most recent call last):
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 718, in _run_job
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/commands.py", line 39, in _ex_handler
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/custom.py", line 2700, in import_ssl_cert
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/custom.py", line 2779, in _check_service_principal_permissions
AttributeError: 'GraphClient' object has no attribute 'service_principals'
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az webapp config ssl import --resource-group [VALID RESOURCE GROUP ON SAME SUBSCRIPTION] --name [VALID APP SERVICE ON RESOURCE GROUP] --key-vault '/subscriptions/[VALID SUBSCRIPTION]/resourceGroups/[VALID RESOURCE GROUP]/providers/Microsoft.KeyVault/vaults/[VALID KEYVAULT ON RESOURCE GROUP]' --key-vault-certificate-name [VALID CERTIFICATE ON KEYVAULT]
Expected Behavior
This worked fine with Azure CLI v2.35
Environment Summary
Windows-10-10.0.19044-SP0
Python 3.10.4
Installer: MSI
azure-cli 2.37.0
Extensions:
application-insights 0.1.16
azure-cli-iot-ext 0.8.10
azure-devops 0.25.0
azure-iot 0.14.1
databricks 0.8.0
log-analytics 0.2.2
portal 0.1.2
resource-graph 2.1.0
storage-preview 0.8.3
subscription 0.1.5
Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
Additional Context
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Getting error while trying to list users in active directory using ...
I tried using the same code but authenticating with service principal . I got an error, that insufficient privileges as the ...
Read more >az webapp config ssl - Microsoft Learn
Import an SSL or App Service Certificate to a web app from Key Vault. az webapp config ssl list. List SSL certificates for...
Read more >AzureCLI task to bind ssl certificates to web app fails
az webapp config ssl bind --certificate-thumbprint $thumbprint --ssl-type SNI --ids $id. The last step fails more often than not(so far 10 failures no...
Read more >App Service Imported SSL Certificate from Key Vault in ...
Note that this might not work for Azure bought App Service Certificates from other subscriptions, as it has only been tested for self...
Read more >Renewed certificate fails to import, with error "key and ... - AskF5
Description. After renewing an SSL certificate, you may find that it fails to import to the BIG-IP system, with the following error:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Importing protected method
_graph_client_factory
is never a supported usage.https://github.com/Azure/azure-cli/blob/ccdc56e7806b6544ddf228bb04be83e485a7611a/src/azure-cli/azure/cli/command_modules/appservice/custom.py#L2767-L2779
appservice
should migrate to the newGraphClient
. See@jiasli we will work on migration on this extension. Sorry we should have identified this on our end earlier.