When sharing an item (file or folder) with others over OneDrive, you have the option to set an expiration date for the link to that shared file. After the expiration date, users that the file was shared with will no longer have access when they try to access the file via the link.
Finding the desired item - Windows
Log in to your computer. From your desktop, open File Explorer by clicking the icon, using the keyboard shortcut (Windows Key + E), or searching for it in the Start menu.
Navigate to the item that you want to stop sharing.
Right click on the item and look at the OneDrive options. Click on Share.
Continue below under the macOS instructions.
Finding the desired item - macOS
Log in to your computer. From your desktop, open Finder by clicking on the icon or by pressing Command + Spacebar on your keyboard and searching for Finder.
Navigate to the item that you want to stop sharing.
Right click, or two-finger click, on the item and look at the OneDrive options. Click on Share.
Continue below
Setting an expiration date for the Share
In the popup window, click on People you specify can edit
Choose Anyone.
Click on the date field to set the date of expiration.
Since the share is set to Anyone, you may want to set a password for the share.