cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gaolai
Level: Powered On

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 Team
Community Support Team

Re: How to use client certificate auth in HTTP action in Flow

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.
Gaolai
Level: Powered On

Re: How to use client certificate auth in HTTP action in Flow

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,

 

Gaolai
Level: Powered On

Re: How to use client certificate auth in HTTP action in Flow

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.

 

kpemberton
Level: Power Up

Re: How to use client certificate auth in HTTP action in Flow

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.

KritikaSingh
Level: Power Up

Re: How to use client certificate auth in HTTP action in Flow

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

Super User
Super User

Re: How to use client certificate auth in HTTP action in Flow

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?

Highlighted
MartinHutchcpa
Level: Powered On

Re: How to use client certificate auth in HTTP action in Flow

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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 208 members 3,148 guests
Please welcome our newest community members: