David E.
David E.

Reputation: 91

Cannot upload public certificate with the same thumbprint error with Azure app service

I am getting "Cannot upload public certificate with the same thumbprint." error when trying to upload my self signed public certificate to an Azure app service. The certificate was created using powershell New-SelfSignedCertificate command and the public key was exported to a DER encoded X.509 .cer file. I have no other certificates installed on the app service.

Upvotes: 8

Views: 2982

Answers (3)

Blu3
Blu3

Reputation: 41

I had the same error, but it turned out that it was just caused by the lack of permissions and the message is misleading.

In my case elevating permissions using PIM enabled upload of the certificate without any issues

Upvotes: 0

harunahi
harunahi

Reputation: 722

I experienced exactly the same problem, i.e. the error: "Cannot upload public certificate with the same thumbprint." I was getting this error even though I was using Basic and Standard pricing tiers. I originally had converted my certificate from a .p12 to a .cer file and tried uploading it on the Azure portal but got this error.

However, I did manage instead to upload the certificate as a .pfx Private Certificate (I did this from the Azure portal) which would seem to be sufficient to reference the thumbprint from within my application.

My original certificate was a .p12 certificate. I was able to convert it to a .pfx by simply changing the extension. (Tipped off to this by: https://akbarahmed.com/2011/11/04/convert-p12-to-pfx/ )

This allowed me to move an application (requiring the certificate to access a 3rd party API) to Azure app service and away from having to use a Virtual Machine.

Upvotes: 0

Tony Ju
Tony Ju

Reputation: 15609

If you are using Free or Shared pricing tier for the service plan, you will encounter such error message since ssl feature is not supported. If you scale up your app service plan to tier Basic, you will not encounter such error.

You can find the capabilities and limits of app service plan here. enter image description here

With free tier. enter image description here

With Basic tier. enter image description here

Upvotes: 2

Related Questions