question

AhmedGokcel-1159 avatar image
0 Votes"
AhmedGokcel-1159 asked Grmacjon-MSFT answered

How do I cancel ongoing 'Pending certificate operation' on Portal when creating App Service Managed Certificates

This is the complete error message I get with redacted ID's:

Properties.CanonicalName is invalid. Found a duplicate certificate with {domain_name} available or in pending issued under serverFarmId /subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.Web/serverfarms/{App_Plan_name}. Pending certificate operation id: {operation_id}, timeout: 7/7/2021 3:48:53 PM.

I have waited for the timeout, but it has been 1 hour past it and still I am not able to try again to create the App Service Managed Certificate.

azure-webapps-ssl-certificates
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Grmacjon-MSFT avatar image
0 Votes"
Grmacjon-MSFT answered

Hi @AhmedGokcel-1159,

We are sorry you are facing this issue. Here are a few things you can try to resolve this issue:

-Based on the error message, it seems like there is already an existing cert for your domain name. Please give it a bit more time for the cert to be created.
-Try refreshing your browser
-Try using the below powershell script to create your cert:

 $fqdn="<Replace with your custom domain name>"
 $pfxPath="<Replace with path to your .PFX file>"
 $pfxPassword="<Replace with your .PFX password>"
 $webappname="mywebapp$(Get-Random)"
 $location="West Europe"
    
 # Create a resource group.
 New-AzResourceGroup -Name $webappname -Location $location
    
 # Create an App Service plan in Free tier.
 New-AzAppServicePlan -Name $webappname -Location $location `
 -ResourceGroupName $webappname -Tier Free
    
 # Create a web app.
 New-AzWebApp -Name $webappname -Location $location -AppServicePlan $webappname `
 -ResourceGroupName $webappname
    
 Write-Host "Configure a CNAME record that maps $fqdn to $webappname.azurewebsites.net"
 Read-Host "Press [Enter] key when ready ..."
    
 # Before continuing, go to your DNS configuration UI for your custom domain and follow the 
 # instructions at https://aka.ms/appservicecustomdns to configure a CNAME record for the 
 # hostname "www" and point it your web app's default domain name.
    
 # Upgrade App Service plan to Basic tier (minimum required by custom SSL certificates)
 Set-AzAppServicePlan -Name $webappname -ResourceGroupName $webappname `
 -Tier Basic
    
 # Add a custom domain name to the web app. 
 Set-AzWebApp -Name $webappname -ResourceGroupName $webappname `
 -HostNames @($fqdn,"$webappname.azurewebsites.net")
    
 # Upload and bind the SSL certificate to the web app.
 New-AzWebAppSSLBinding -WebAppName $webappname -ResourceGroupName $webappname -Name $fqdn `
 -CertificateFilePath $pfxPath -CertificatePassword $pfxPassword -SslState SniEnabled 


Hope that helps. If you are still facing this issue after a few hours please let us know.

Thanks,
Grace

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.