Step 1: Sign into https://portal.office.com/ and navigate to OneDrive
Step 2: Locate the file or folder in OneDrive.
Step 3: Right-click on the file or folder and click on Manage Access.
Step 4: Click on the three-dot or elipses icon respective to the shared link.
Step 6: Now, click on Set expiration date and choose the date from the drop-down calendar.
Step 7: Click Save.