Hello @I Nino ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I understand that you are unable update the SSL certificate in Azure Application gateway and getting the following error "(ApplicationGatewayCertificateOnlyOneOfDataAndKeyVaultSecretIdMustBeSpecified) Only one of Data and KeyVaultSecretId must be specified for Certificate '/subscriptions/xxxx/connectbase-new' in Application Gateway".
You can find the troubleshooting doc below with this error and suggested resolution:
Description: You may encounter this error when trying to update a listener certificate. When this error occurs, the change to update the certificate will be discarded, and the listener will continue to handle traffic with the previously defined configuration.
Resolution: To resolve this issue, please try uploading the certificate again. PowerShell commands may be used to update certificates uploaded to Application Gateway or referenced via Azure Key Vault.
From your CLI command above, looks like you are uploading certificate directly to Application gateway and not from Azure Key Vault. Please confirm this.
If yes, then please run the below PowerShell commands:
$appgw = Get-AzApplicationGateway -ResourceGroupName "<ResourceGroup>" -Name "<AppGatewayName>"
$password = ConvertTo-SecureString -String "<password>" -Force -AsPlainText
Set-AzApplicationGatewaySSLCertificate -Name "<oldcertname>" -ApplicationGateway $appgw -CertificateFile "<newcertPath>" -Password $password
Set-AzApplicationGateway -ApplicationGateway $appgw
If you encounter any issues, please share the error message for further troubleshooting.
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.