cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

File Approval with sharing files

Hello,

 

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?

 

Thanks!

4 REPLIES 4
Anonymous
Not applicable

 

Could you share the screenshot of the flow configuration?

Anonymous
Not applicable

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.

Anonymous
Not applicable

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?

 

bpare_0-1593609967902.png

 

sadiku-adetola
New Member

I found this article useful. It had to do with making sure the user used for the SharePoint connection has proper permission to the list o library you are working in. So add the user to the list owners group.

 

https://powerusers.microsoft.com/t5/I-Found-A-Bug/Cannot-stop-sharing-an-item/td-p/929925

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,566)