Azure Function App Won't Retrieve Public Cert even with WEBSITE_LOAD_CERTIFICATES: *

Stephen Mallin 26 Reputation points
2025-01-27T16:58:23.6933333+00:00

I have a .cer loaded into an Azure Function app.User's image

I have an app setting WEBSITE_LOAD_CERTIFICATES: * (I have also tried this with the thumbprint obscured in 1st image)

User's image

I am using the following code to retrieve the certificates

User's image

When I deploy the function app to this slot and run the code, the count is always zero (and the exception is thrown), whether I search for the specific thumbprint or not.

What am I missing to load this .cer into the app so I can attach it to an outbound request?

Thanks.

Resources used:

https://learn.microsoft.com/en-us/azure/app-service/configure-ssl-certificate-in-code?tabs=windows

https://learn.microsoft.com/en-us/answers/questions/1287639/sending-an-https-request-from-an-azure-function-to

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,373 questions
{count} votes

Accepted answer
  1. Ryan Hill 29,566 Reputation points Microsoft Employee
    2025-01-30T17:03:44.0533333+00:00

    Hey @Stephen Mallin

    Thanks for the providing the additional information on your function app. The plan your function is running on is Linux based. That means you need to you alter your code to reflect pulling certificates from in that OS.

    See https://learn.microsoft.com/en-us/azure/app-service/configure-ssl-certificate-in-code?tabs=linux#load-certificate-in-linuxwindows-containers for more information.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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