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

How to stop sharing documents after certain time frame through any flows

Files stored in document library are shared with few people. Can sharing be stopped after certain time frame for those files either through any flows or through any other bulk update which can be done manually ?? Please help

 
 
 
 
2 ACCEPTED SOLUTIONS

Accepted Solutions
Gristy
Resident Rockstar
Resident Rockstar

Make a column with a date and populate i.e. StopSharingDate

 

Make a flow on a schedule that is daily

Get the items

If StopSharingDate = Today

Execute StopSharing Action

View solution in original post

v-bacao-msft
Community Support
Community Support

 

Hi @Anonymous ,

 

Please try the following method to configure Flow.

  • Create a Date type field in the SharePoint Library to record the date the sharing need to be stopped.
  • Configure Get files actions to get all the files and check if the current date is equal to the specified date.
  • If they are equal, execute Stop sharing an item or a folder action.

Image reference:

20.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Gristy
Resident Rockstar
Resident Rockstar

There is a stop sharing flow action and that action reinherits the permission from the library which may be what you are after.

 

You can determine your own schedule by using a scheduled flow, and maybe a date column for a date that is the one to query to stop sharing at?

Anonymous
Not applicable

Yes I want the same what you told but Can you please five me any example or any reference for the same?


@Gristy wrote:

There is a stop sharing flow action and that action reinherits the permission from the library which may be what you are after.

 

You can determine your own schedule by using a scheduled flow, and maybe a date column for a date that is the one to query to stop sharing at?


 

Gristy
Resident Rockstar
Resident Rockstar

Make a column with a date and populate i.e. StopSharingDate

 

Make a flow on a schedule that is daily

Get the items

If StopSharingDate = Today

Execute StopSharing Action

Hi @Anonymous 

 

You could also add the expiration on a create a sharing link in the primary flow itself :

dfd.PNG

 

So basically, after creating the file action you can add this action and configure the sharing link (this will only control the sharing link that is created). The other option would be to set a recurrence flow and use the stop sharing item/ file or folder action: dfgg.PNG

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

v-bacao-msft
Community Support
Community Support

 

Hi @Anonymous ,

 

Please try the following method to configure Flow.

  • Create a Date type field in the SharePoint Library to record the date the sharing need to be stopped.
  • Configure Get files actions to get all the files and check if the current date is equal to the specified date.
  • If they are equal, execute Stop sharing an item or a folder action.

Image reference:

20.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-bacao-msft  Any ideas why I get this error?

With either of the IDs from, 

 

"body": {
"status": 403,
"message": "Exception of type 'Microsoft.SharePoint.SPConnectorException' was thrown.\r\nclientRequestId: abde840c-70c3-4460-a48f-235899b4eefe\r\nserviceRequestId: abde840c-70c3-4460-a48f-235899b4eefe"
}
}

Screenshot_1.png

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (1,812)