web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / 401 Unauthorized - You...
Power Automate
Suggested Answer

401 Unauthorized - You do not have permissions to perform action 'run' on scope '/triggers/manual/paths/'

(0) ShareShare
ReportReport
Posted on by 4

Hello,

 

I am a total beginner in ms flow. My task is to integrate signing application with Sharepoint. I created HTTP triggered flow that receives signed documents and then stores them in Sharepoint.

 

patryks_0-1620718796977.png

 

When I trigger this flow from Postman by executing generated url address then everything works just fine - document is added to Sharepoint. When I execute this url from my application then I receive:

 

 

org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 Unauthorized: [{"error":{"code":"AuthorizationFailed","message":"You do not have permissions to perform action 'run' on scope '/triggers/manual/paths/'. Verify you are making the request with the appropriate HTTP method. See http://aka.ms/logic-trigger for details."}}]

 


 I searched the internet and found some similar cases but in none of them, I found relevant explanations or solutions. If you could help me understand:

1. why is it working in postman and not in the application

2. how to fix it?

Categories:
I have the same question (0)
  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @patryks  can you share the code that you are using to do the HTTP request to trigger the flow?

  • patryks Profile Picture
    4 on at

    Basically I use restTemplate

     

    //url - hardcoded url generated in flow
    
    ResponseEntity<Object> responseEntity = restTemplate.exchange(url, HttpMethod.POST, entity, Object.class);

    I do not set any headers except for Content-Type: application/json. The url is interpreted correctly as when I remove parameters sp, sv or api-version then I receive other exception.

  • patryks Profile Picture
    4 on at

    Ok. I will try that but at first glance, it seems it is exactly the same way as I did - the only change is that in this link the header is named "content-type" and I use "Content-Type". Will get back to you with the results. Thank you. 

  • LorenzoBoers Profile Picture
    8 on at

    Any results yet? I'm experiencing a simular issue.

  • Suggested answer
    AW-31032122-0 Profile Picture
    4 on at
    Not sure if anyone is still dealing with this issue but I recently ran into it... When you copy the url out of power automation it has the "/" part in the sp query param encoded to %2F. Springboot's RestTemplate does not handle this correctly. Just convert the %2F back to a / in webhook url and this should solve your issue... At least it did for me! Curl and Postman were able to handle the url encoding, RestTemplate was not
     
    so instead of sp=%2Ftriggers%2Fmanual%2Frun it would just be sp=/triggers/manual/run

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard