user246392
user246392

Reputation: 3009

How to download SSL certificate that was imported into an Azure Function app?

Last year I uploaded a pfx certificate to a consumption-based Azure Function app. Currently, I don't have access to it anywhere else. Is it possible to download this pfx file in any way? I could not see this option on the portal. Tried FTPing into the app and there was nothing there either.

Upvotes: 1

Views: 1681

Answers (1)

SwethaKandikonda
SwethaKandikonda

Reputation: 8234

One of the workaround is to download it from your KUDU console. Steps to download your certificate.

  1. Add WEBSITE_LOAD_CERTIFICATES to * from your Application settings.

  2. Navigate to your KUDU console from Advanced Tools >> Go >> Debug Console >> Powershell.

  3. Get-ChildItem -Path Cert:\CurrentUser\My lists the certificate loaded in current user.

  4. Then you can export the same to your wwwroot folder using

    Get-ChildItem -Path Cert:\currentuser\my | 
    Select-Object -first 1 | 
    Export-Certificate -FilePath D:\home\site\wwwroot\certificate.pfx -Force
    
  5. Now you can directly download from D:\home\site\wwwroot\certificate.pfx

    enter image description here

REFERENCES: Export SSL Certificate from Azure Web App

Upvotes: 1

Related Questions