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

Http Request Flow

Hi All,

 

I have a need to connect to an external API that needs me to first get an oAuth token.  I have managed to successfully get a token using the same details in PowerShell.  But when I make my http request in Power Automate I get the error "Full authentication is required to access this resource"

 

As I mentioned, I use the same URI, AppSecret and AppKey in my PowerShell script which gives me a token.  So I can only guess I'm doing something wrong or Power Automate doesn't allow me to connect. 

 

This is my step from PA

 

2020-11-03 14_29_22-Edit your flow _ Power Automate.png

 

Any help would be greatly appreciated.

 

John

9 REPLIES 9
PrasadAthalye
Super User
Super User

@sharepoint_john - I think you will have to client credentials flow instead of password grant. Also is this to connect SharePoint?

 

 

grant_type=client_credentials&client_id=<Provide Client Id>&client_secret=<Provide Client Secret>

 

since I was querying sharepoint, I had to Provide resource parameter too...

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Hi @PrasadAthalye,

 

Thanks for your response.  

 

No, this isn't a SharePoint request.  It's to an external API provided by one of our suppliers.  Is this not possible?

 

I tried using grant_type=client_credentials but I got the same error.

 

Thanks again for your help.

 

John

Hi @sharepoint_john ,

 

You should use following in the body :

 

Capture.JPG

scope= SITENAME/.default

 

site name is against which you are making call.

 

Thanks

 

 

Hi @ManishJain,

 

The call I'm making is to an external API, not a SharePoint Site.

 

Thanks...

 

John

Hi @sharepoint_john ,

 

Please remove microsoft uri and use yours one to get authentication token. 

 

Thanks

Hi @ManishJain 

 

I'm not using the microsoft URI, I'm using the one provided by our supplier, I just blanked it out on the screenshot.

 

Thanks...

 

John

Hi @sharepoint_john ,

 

This was just an example to use , if you are getting output well and good.

 

Thanks

sharepoint_john
Frequent Visitor

Still struggling with this if anyone has any other suggestions. 

 

Just to clarify, I'm making an http request to an external suppliers API.  I can make the call and get a token using PowerShell.  But when I try to do it from Power Automate I get the error.

 

"Full authentication is required to access this resource"

 

Any advice would be greatly appreciated.

ManishJain
Solution Sage
Solution Sage

Are you able to make this same call from Postman. if it works there here are the steps you can use to grab the parameters to use in Power automate : 

1. Click on Code , it opens up another pop up window

 

Capture.JPG

2 . Select HTTP  and grab the body, Authorization part from the window and put in Power automate.

 

Thanks

1.JPG 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,296)