Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

File Approval with sharing files



I have somme issues with a flow for file approval. This is my first one, so I have next to no clues what I'm doing with flows (other than knowing my way around programming). So, I started with the tempate Request approval in Teams for a selected item in SharePoint. After figuring out that an item is not a file and I need to switch to a For a selected file trigger, all went well; changed the fields here and there in the emails, approval with multi approvers, etc. So that work so far.


Then I needed to add a shared link inside my organisation for people that doesn't have access to the SharePoint site to start with. However, I also need to remove sharing as soon as the flow is done. Easy I though, just add the Create sharing link for a file or folder action, then when the approval is done, add the Stop sharing an item or a file action. Configured them with the result ID (@triggerBody()?['entity']?['ID']) from the trigger for both of them. Run a test, sharing link is working no issues there. But the flow fail at the stop sharing action with the result below. Seems that I am forbidden to stop sharing a file. Isn't strange that I can create a sharing, but not stop it? Had other issues with also moving the file on another test (wanted to move the file in another folder when approval is done), but the Move file action that ask the file ID doesn't seem to accept the same file ID (@triggerBody()?['entity']?['ID']) used for sharing a file, it doesn't find the file for moving.


Stop sharing error:





  "status": 403,
  "message": "Exception of type 'Microsoft.SharePoint.SPConnectorException' was thrown.\r\nclientRequestId: xxxxxxxxxxxxxxxxxxxxxxxxxxx\r\nserviceRequestId: xxxxxxxxxxxxxxxx"






File moving error:





  "status": 400,
  "message": "Nous n’avons pas pu vérifier l’existence de l’objet source à l’adresse « https://xxxxxxxxxxxxxxxxxxx » en raison de l’erreur « The system cannot find the file specified. (Exception from HRESULT: 0x80070002) ».\r\nclientRequestId: xxxxxxxxxxxxxxxx\r\nserviceRequestId: xxxxxxxxxxxxxxxxxx"






Any idea?



Helper III
Helper III


Could you share the screenshot of the flow configuration?

Frequent Visitor

I decided to abandon using Power Automate for the moment, too much of my official work to take time to learn Power Automate and make it work.

Frequent Visitor

Ok, going back finally... I worked with our IT to bypass the sharing process, everybody have access, so only need for them to have the link of the file. However, when I do the following "For a selected file", everything has the right data except the "Link to element" field, using the "itemUrl" from "For a selected file", it seems to generate a URL with somewhat valid data (the URL has data related to the file in question), but it load a blank website, not showing the file. Any idea where to look for debug?




Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,536)