cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tiprat
Frequent Visitor

HTTP POST request error: invalid_client_id

Hi

 

I am running a HTTP POST action from MS Flow to get a bearer token from a Salesforce app:

 

Bearer.PNG

 

but it always fails with the following error: "request error: invalid_client_id"

 

I have checked & rechecked all the id's & secrets etc and they are all correct, if I make the call via Postman it all works as expected but using exactly the same parameters in Flow, it fails.

 

Guessing there is a subtle change needed somewhere to get it working in MS Flow?

 

Any help appreciated !

 

Cheers

 

 

 

 

 

 

 

3 REPLIES 3
SamPo
Impactful Individual
Impactful Individual

@tiprat I see you're making calls to Saleforce.

 

Have you tried using the pre-built Salesforce connector? We use it for a number of flows and it is definitely one of the richest connectors today in Flow in terms of the different methods you can use and objects you can access.

I would highly recommend try using that instead of writing your own calls and this should solve any issues.

 

This is one of the few cases where its better just to start in Flow and not build it in Postman beforehand.

 

Hope this helps,

Sam

tiprat
Frequent Visitor

Hi

 

Yeah SF connector works well, just wondering more in principle why it fails in Flow when works in other applications etc & best way to troubleshoot these issues when seem specific to Flow.

 

Cheers

SamPo
Impactful Individual
Impactful Individual

@tiprat I would suggest the following.

Create a new flow with a trigger of 'when HTTP record is received'

From Postman, take the flow that works with Salesforce and change the URL to the endpoint of the new flow you set up

Then check the log runs from the new flow and take a look at the output values of the HTTP trigger. There you will see the exact values that are actually sent by Postman and you should be able to copy them to your original flow that you are trying to connect to SF.

 

Hope this helps

Sam

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,045)