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

HTTP authentication to Xero

I am trying to use the HTTP action to connect to the Xero api using Client Certficate for their OAuth 1.0 authentication method.

Xero have private and public app options. I am using the Private app option.

I have used OpenSSL to produce the .cer and .pfx files and converted the .pfx file to base 64.

The Private app is registerd with Xero and I have a consumer key and token, even though the token is not needed for private app connections.

 

What I cant find anywhere is guidance on how to populate the fields in the HTTP action in Flow.

I.e. the headers, query and body.

 

At the moment I get an error to do with the password. "Could not load the certificate private key. Please check the authentication certificate password is correct and try again."

However I think the problem is bigger than that.

 

Any guidance would be greatly appreciated.

 

1 ACCEPTED SOLUTION

Accepted Solutions
JesseW
Level: Powered On

Re: HTTP authentication to Xero

Cheers Martin. I will leverage our developers to look at building a custom connector like you have outlined below. Thanks again. 

View solution in original post

7 REPLIES 7
Community Support Team
Community Support Team

Re: HTTP authentication to Xero

Hi @MartinHutchcpa,

 

It seems that you are trying to use the HTTP action to make requests with Microsoft Flow, please check the following blog for a reference:

https://flow.microsoft.com/es-es/blog/http-card-tutorial/

By the way, here is a blog on HTTP trigger for your reference:

http://johnliu.net/blog/2018/10/microsoft-flow-http-trigger-request-trigger-and-you-probably-dont-wa...

In addition, there is a request on new connector Xero, please feel free vote the idea at here:

https://powerusers.microsoft.com/t5/Flow-Ideas/New-Connector-Xero/idi-p/8329

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MartinHutchcpa
Level: Powered On

Re: HTTP authentication to Xero

Thank you, but this does not address how to setup the authentication using Client Certficate.

Highlighted
JesseW
Level: Powered On

Re: HTTP authentication to Xero

@MartinHutchcpa I have also come across the same issue of not being able to authenticate to the Xero API via MS Flow.

 

None of the three authentication options within MS Flow look compatible with Xero.

 

This is an example of the private app details generated within Xero:

2019-01-25_14-35-50.png

 

I can't seem to find a definitive answer on whether oauth 2.0 is backwards compatible or not?

 

2019-01-25_14-36-57.png

MartinHutchcpa
Level: Powered On

Re: HTTP authentication to Xero

It turns out the it is not possible.

For reference. 

  • Create a logicApp to generate the authorisation header for each of the GET, POST and PUT calls
    • Use parameters for URi and custom keys etc
  • Export to Flow as a custom connector
  • Pass parameters to Logic App to generate and return Authorization header string
  • Use HTTP call to retrieve json from Oauth 1.0 Xero source
JesseW
Level: Powered On

Re: HTTP authentication to Xero

Great thanks Martin,

 

Did you happen to stumble across instructions on setting up logicapp to generate the authorisation header by chance? Is this the process you are referring to?

 

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-custom-api-authentication

MartinHutchcpa
Level: Powered On

Re: HTTP authentication to Xero

I had some guys write the code in c#, deploy it to our Azure logic app space. The code generated the header.

Then I exported to flow to create the custom connector.

The logic app had parameters: -

-url

-consumer key and secret

-pfk password. (I had previously created an ssl cert using OpenSSL)

Happy to provide details of guys I paid to write above code. It only took about an hour.

JesseW
Level: Powered On

Re: HTTP authentication to Xero

Cheers Martin. I will leverage our developers to look at building a custom connector like you have outlined below. Thanks again. 

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand 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!

Users Online
Currently online: 294 members 2,999 guests
Please welcome our newest community members: