cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate I
Advocate I

How to use client certificate auth in HTTP action in Flow

I tried to use Client Cert Auth in HTTP action in Flow. But I always got the error either 

The authentication certificate is not formatted correctly. Could not load the certificate.

or 

Could not load the certificate private key. Please check the authentication certificate password is correct and try again.

 

I understand I need put Base64 pfx file, but can anybody share how do you create the Client Certificate that Flow will accept? I tried to use makecert.exe and pvk2pfx.exe to create a client certificate, but when copied the pfx file to my flow, it threw me the first error.

7 REPLIES 7
Community Support
Community Support

Hi @Gaolai,

 

Could you please share a screenshot of your flow's configuration?

 

When you use "HTTP" action with Client Certificate authentication, within Pfx field of "HTTP" action, you should type the Base64-encoded contents representation of your PFX file. Within Password field, type the password to access the PFX file.28.JPG

The parameter format of Client Certificate Authentication as below:

{
    "type": "ClientCertificate",
    "pfx": "aGVsbG8g...d29ybGQ=",
    "password": "xxx..xxx"
}

 

Please check if you have filled proper value within Pfx field and Password field of "HTTP" action.

 

More details about the Client Certificate Authentication, please check the following article:

Client Certificate Authentication

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Capture.PNG

 

Hi Kris,

 

Thanks for your reply. This is exactly what we did in our flow. Please refer to the screen shot above. I generated a client cert by using  makecert.exe and pvk2pfx.exe, and copied the whole content from the pfx to the flow. But I got the auth cert is not formatted correctly error. I wonder if the way I put the certificate is correct? How come my pfx content does not look like yours?

 

Thanks,

 

I did a little more research, pfx is a binary file, not base64 encoded file. So I wonder how to generate a base64 encoded pfx file needed by Flow? I tried using openssl to generate client certificate by following this article, https://blog.didierstevens.com/2008/12/30/howto-make-your-own-cert-with-openssl, but Flow just won't take it.

 

New Member

I am facing the same problem in Flow.  I have a base64 encoded version of the certificate where the key is exportable and provided a password but still receive this error message.  Any help from Microsoft would be greatly appreicated.

Hi,

 

Even, we are facing same issue and have asked for help on Microsoft forum as well.. But till now we have not received any response or answer for the same. Please do keep posted if you are able to resolve this.

 

Thanks & Regards

Kritika Singh

Just a thought, Could you upload the certificate file in somethinglike SharePoint. Then run a get file content action to get the content of the certificate. And then use this content to do what you are trying to do?

Helper III
Helper III

Hi,

Did anybody manage to resolve how to get a base64 version of the pfk generated and used successfully in their flow?

 

Thanks

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (41,912)