web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Could not load the cer...
Power Automate
Unanswered

Could not load the certificate private key

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all

 

I'm trying to call a REST API which requires the use of a Client Certificate to authenticate using the http action.

 

I'm base64 encoding the pfx file and are supplying the corresponding password but the flow fails with the error message: "Could not load the certificate private key. Please check the authentication certificate password is correct and try again."

 

I'm using the same certificate to access the api server programatically with no issues. The error message indicates to me that the action is not able to load and use the certificate/password correctly.

 

Have anyone gotting this authentication mechanism to work properly? If so, how did you generate the certificate you are using?

 

In advance, thanks!

 

-svein

Categories:
I have the same question (0)
  • v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @ bangorkeith,

    Could you please share a screenshot of the configuration of your flow?

    Could you please share more details abou the issue that you meet?

     

    The error message told that the flow could not load the certificate private key.

    Please take a try to use base-64 encoding the certificate string refer to link below: 

    https://docs.microsoft.com/en-us/azure/connectors/connectors-native-http

     

    Please check the authentication certificate password is correct and try again,please let me know if your problem could be solved.

     

    Regards,
    Alice Zhang

  • esbharad Profile Picture
    Microsoft Employee on at

    Is this resolved? I am facing the same issue.

  • ozawako1 Profile Picture
    4 on at

    I faced same issue and solved.

     

    It seemed like base64 decoding did not work well.

    so i stored my pfx file at one drive. 

    and made flow step to read it.

    and set it to pfx parameter.

     

    it works.

  • GabrielStJohn Profile Picture
    Microsoft Employee on at

    Hello, @Anonymous!

    Have you had an opportunity to apply @ozawako1‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!


    Thank you for being an active member of the Flow Community!

    -Gabriel
    Flow Community Manager

  • _praveen Profile Picture
    2 on at

    Hi,

    It doesn't work for me... When i do that, i see an error " Unable to process template language expressions in action 'HTTP' inputs at line '1' and column '2850': 'Error reading string. Unexpected token: StartObject. Path 'pfx'.'." Please advise...

  • ObiWanCote Profile Picture
    4 on at

    I've found a couple things that may help anyone reading this thread.  

     

    • You may have a problem if you are using a self-signed certificate. 
      • According to the documentation: The authentication type to use for Secure Sockets Layer (SSL) client certificates. While self-signed certificates are supported, self-signed certificates for SSL aren't supported.
    • The approach of Base64 encoding the contents of the pfx file works (if you're using a certificate signed by a trusted CA)
      • make sure you don't have any trailing newline characters when you copy the Base64 string
    • The approach of loading the pfx file in a previous action also works, but you still need to Base64 encode that output!
      • so in the pfx field of the HTTP Action, instead of just putting "File content" (i.e. the output from a "OneDrive get file content" action), use the base64 function to wrap the body of the file's contents... like this:
        • base64(body('Get_file_content'))
        • in this example "Get_file_content" is the name of the action that is getting the file content, but with underscores replacing the space characters

     

     

  • steffenf Profile Picture
    2 on at

    Hi,

    are there any other solutions ?

    i have the same problem and all the methods described do not work for me. 

    always the same error.

    Does anyone else have an idea?

    In Powershell and Postman it works without failure.

    Flow3.png
    Flow2.png
    Flow1.png
  • juresti Profile Picture
    319 on at

    I just started having this error from one day to the next.

     

    It was working fine then all of a sudden it is not working. I did notice the Office 365 admin greeted me with "Welcome to the new Admin Control Center".

     

    This was from one day to the next of working perfectly. No need to look at the flow since nothing was changed.

     

    I suspect the update must have changed something.

     

    The same api call works in Postman without a problem.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 607

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard