Azure Functions App | Certificate Based API Calls

Kiran Purohit 0 Reputation points
2024-03-29T11:56:13.4+00:00

Certificate based API call is failing, getting Policy falsified error from client.

I have configured thumbprint in c# post method code and uploaded .cer certificate in azure portal but still unable to connect client service from Azure function dot net.

unable to connect service through certificate base authentication

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,792 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,353 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,987 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. hossein jalilian 4,040 Reputation points
    2024-03-29T23:39:49.5066667+00:00

    Hello Kiran,

    Thanks for posting your question in the Microsoft Q&A forum.

    You can troubleshoot and resolve this problem by following these steps:

    1. Verify that the certificate's thumbprint uploaded to the Azure portal matches the one specified in your C# code and is correctly associated with the Azure Functions app.
    2. Confirm that the certificate has the necessary permissions to authenticate with the client service and is trusted and valid for making API calls.
    3. Examine your C# code thoroughly to ensure the certificate is correctly loaded and utilized in API calls, checking for any errors or issues.
    4. Review Azure Functions app logs for any error messages or warnings that may provide insight into why authentication is failing.
    5. Use tools like Postman or cURL to independently test connectivity to the client service outside of Azure Functions, verifying if certificate-based authentication functions correctly.

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

    0 comments No comments

  2. Pinaki Ghatak 2,400 Reputation points Microsoft Employee
    2024-05-07T14:45:17.2933333+00:00

    Hello @Kiran Purohit

    To troubleshoot this issue, we need to check if the certificate is correctly uploaded to the Azure portal and if the thumbprint is correctly configured in the C# post method code.

    Also, make sure that the certificate is in the correct format (.cer) and that it is uploaded to the correct location in the Azure portal.

    If the certificate is correctly uploaded and the thumbprint is correctly configured, then we need to check if the client service is configured to accept certificate-based authentication. If the issue persists, you can try to use other authentication methods like Azure AD application with service principal or Azure AD authentication.

    The above steps to help you further in your journey

    0 comments No comments