Share via

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

Ahmed Gokcel 11 Reputation points
2021-07-07T15:44:14.307+00:00

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 App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 19,511 Reputation points Moderator
    2021-07-07T18:38:53.81+00:00

    Hi @Ahmed Gokcel ,

    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

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.