Wednesday 31 July 2019

Provide Anonymous User Access to Office 365 SharePoint Files for Specific Duration

In this post, let us look at giving the access to the files for specified interval. This requirement might be very useful in several aspects. Say for example, the scenario could be like the form/documents that needs to be filled within the specified deadline once generated.

Giving access doesn't mean working with file/item level permissions. This approach provides ways to generate links for SharePoint files with necessary permissions, that could be accessible for sometime.

In the previous article, we have seen ways to create and share links, which is scoped to users/groups/anonymous users.

Microsoft has recently released an update, which has new set of actions. One such feature is stop sharing an item or file action.


Provide Access for Specified Time (Stop Sharing File)


From the previous post, we will go one more step ahead in revoking the provided access and sending out notification to user on the same.

Here 3 more actions are added.
  • Delay: As per requirements, provide a delay/wait time for flow to pause.
  • Stop sharing an item or folder: Revoke all the previously shared links.
  • Send an email : Notification to say the permissions has been revoked.

Note: Stop sharing an item or folder, revokes/removes all the previously shared links, irrespective of any scope and target audience. So for example, let us consider previously two type of scoped links are created and shared for an item/folder. Executing stop sharing action will revoke/remove all the share links for that particular item/folder.

The following snapshot shows the entire business process/flow.
Flow for providing access for specified time duration
Flow for providing access for specified time duration


Detailed Snapshots


The below snapshot shows the way to create and share link. This link is anonymous access link. And anyone who gets this link, will be able to access the document. This flow has been detailed in the previous article.
Create and share the anonymous access link for file
Create and share the anonymous access link for file

The following shows the detailed actions as explained above in this post. This flow will let access to link for 1 day (24 hours). After which the link will be removed and mail communication is sent to necessary user/groups. In this case, the link shared is anonymous access link and the mail ID mentioned is just for communications as per requirement.
Provide a delay and stop sharing the file
Provide a delay and stop sharing the file


After Removing Links


The following snapshot shows the message after the revoking the links (stop sharing file).
Message once the sharing is stopped
Message once the sharing is stopped