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.
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?
Any results yet? I'm experiencing a simular issue.
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.
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 can you share the code that you are using to do the HTTP request to trigger the flow?
Michael E. Gernaey
7
Super User 2025 Season 1
rzaneti
7
Super User 2025 Season 1
CU20032117-0
4