A Microsoft file hosting and synchronization service.
The parent-folder sharing link is the reason the subfolder is still reachable. In OneDrive and SharePoint, sharing a parent folder can also provide access to child folders, and sharing adds permissions rather than restricting them. Breaking inheritance on the subfolder does not reliably block access that was already granted through the parent folder link.
To properly restrict the subfolder:
- Remove access from the parent folder.
- Open the parent folder.
- Select Details or Information to open the details pane.
- Select Manage access.
- Remove the active sharing link for the parent folder, especially the Anyone link.
- If needed, select Stop sharing for the parent folder.
- Keep the restricted subfolder on unique permissions.
- Ensure the subfolder is not inheriting permissions from the parent.
- Keep access only for the intended account.
- Share only the content that should remain accessible.
- Do not share the higher-level parent folder if some child folders must stay private.
- Share only the specific folders or files that others should access.
- Prefer direct sharing or a more limited link instead of an Anyone link.
- Re-test after removing the parent link.
- Test again from a device or browser session that is not signed in.
- The restricted subfolder should no longer open through the old parent-folder link once that link is removed.
If the goal is to let people access most subfolders but not one restricted subfolder, the safer design is:
- remove sharing from the parent folder,
- keep the restricted subfolder with unique permissions,
- share only the allowed subfolders individually.
Also note that if a OneDrive site has Limited-access user permission lockdown mode enabled, users can receive access errors when a folder is shared but they do not have access to the parent site or folder. In that case, supported workarounds are to share individual files instead of folders, share the whole site or subsite, or disable that site collection feature if it is not required.
References: