View in File Explorer - Cookies are only Persistent for a week

Occasional Contributor

TonyWilson_0-1640925575676.png

TonyWilson_1-1640925781940.png

 

About a week later, the folders in file explorer will come up with access denied. Seems like the cookies are gone. Just clicking "View in File Explorer" at any document library will re-activate all folders/libraries.

 

Is this by design or do I need to add something more to the settings?

https://docs.microsoft.com/en-us/SharePoint/sharepoint-view-in-edge

9 Replies

@TonyWilson Hi, according to the docs that UsePersistentCookiesForExplorerView the special cookie expires after 30 minutes when the KMSI isn't selected Set-SPOTenant (SharePointOnlinePowerShell) | Microsoft Docs

 

If selecting the KMSI it seems to be the default value in line with your experience? Session timeouts for Microsoft 365 - Microsoft 365 Enterprise | Microsoft Docs

Various websites send cookies to your computer, which your browser saves and stores. Internet Explorer 8 saves cookies to your hard drive like any other browser, but also lets you view the cookies through the browser itself. You can also search your hard drive for stored cookies, as long as you know what folder to look for.

What are Cookies?

Cookies are text files that websites send to your computer so that the website can identify you in the future. There are two major types of cookies: session cookies and persistent cookies. Session cookies expire immediately when you log out and close the website that sent them. Persistent cookies are stored on your hard drive. Websites use persistent cookies to remember things like your preferences and shopping history.

Where are they located on your computer?

Internet Explorer 8 stores cookies on your hard drive in the Temporary Internet Files folder. The location of the Temporary Internet Files folder will vary depending on your operating system. Use the folder search function to search for "Temporary Internet Files" to locate the folder on your hard drive. You may need to change your folder settings so that you are able to view hidden files to find it. The "Folder Options" menu in Windows 7 is located in the Control Panel.

Viewing Cookies

The "Safety" menu in Internet Explorer 8 contains all your privacy and content settings. If you want to view the cookies on your computer without hunting down the temporary files folder, open Internet Explorer, and click "Safety." Click "view files" to open the temporary files folder. The safety menu also allows you to control your cookie settings. For example, you can tell it to block all incoming cookies, and set exceptions so that certain websites can still send cookies.

How to Delete Cookies?

Most cookies are fairly harmless for your computer, and they don't take up much space; however, more malicious cookies get used to trace your browsing habits so that adware and spyware can better target you. To delete your cookies, open Internet Explorer and click the "Safety" button. The "Delete Browsing History" menu gives you the option of deleting your cookies. Internet Explorer 8 also lets you select which elements of your browsing history you want to delete, so check only cookies if you just want to get rid of those.

How to Find Out What You Have Been Doing on Your Computer in the past?

While you're using your computer to create files and images and to surf the Internet, it's keeping a record of what you do on the computer for your convenience. If you need to find documents that you've created, or see what homework you've completed, you'll find records of your activity very helpful. Locating these files is simple and easy, as long as they haven't been deleted from your system.

Follow the below instructions:

View your browsing history. Internet browsing history will let you see what has been viewed online if it hasn't been deleted.

To view history in Firefox, open the browser and click "History." Select "View All History" to see the websites that have been viewed.

View history in Internet Explorer by opening your browser, clicking "View," then selecting "Explorer Bar" and choosing "History." Select the timeframe that you want to view then double-click it to expand the list. Browse through the Internet history.

See history in Safari by opening the Web browser then clicking on the "History" menu. Hold down the cursor and hover over the date you want to view. Continue holding your cursor down to scroll through the list of visited pages.

2 Check out cookies on your computer. Cookies are stored on your computer after you've visited a website.

To view cookies in Firefox, open the browser, click "Tools," select "Options," then select the "Privacy" option on the menu. Click on "Remove Individual Cookies" to view all saved cookies.

View cookies in Internet Explorer by viewing the Temporary Internet Files. Open your IE browser. Click "Tools" then select "Internet Options." Click "Settings" under Browsing History. Click "View Files" to view Temporary Internet Files.

See cookies in Safari by opening the browser then selecting "Preferences." Click on the "Security" tab then click "Show Cookies." Browse through the cookies stored on your computer.

 

3 View recent files and documents. You can see what programs, documents, images, and other files have been viewed or edited on your computer.

In Windows operating systems, click "Start" or the Windows icon on the task bar. Select "Recent Items." View the recent files that have been altered or viewed.

On a Mac, click on the "File" menu then select the "Open Recent" folder. This folder will display all of the most recently-used programs, viewed images, documents and other files.

4 View all the files that have been downloaded to your computer. To view Downloads in Windows XP, locate the folder where you place all downloads. Open the folder and view recently downloaded files. In Windows Vista, click on the Windows icon, select the user's name on the top right of the menu. Click "Downloads" from the dialog box that appears. Browse through the downloaded files.

On a Mac, look at the bottom of the Dock and locate the "Downloads" folder. Double-click the folder to view downloaded files on your computer.

5 Consider downloading and installing a key logger on your computer. Key loggers record every stroke made on the keyboard, so you'll be able to see what you do regularly on your computer. You could also invest in a screenshot program that will take screenshots every so often so you can record what you do on your computer.

How to Identify Cookies on a Computer?

When you visit a website with cookies enabled, the site tracks your activity. This sounds intrusive and perhaps dangerous, but cookies don't actually collect personal data. They track your computer's activity simply to identify return visitors, and some sites personalize Internet content based on what products or services you browsed during your last visit. Cookies are text files that don't take up much space, and Microsoft explains that these non-executable files are incapable of delivering viruses. Nevertheless, some users find these files too pesky or invasive, and you can identify cookies on your hard drive after changing your folder options.

Follow the below instructions:

1 Click on the Windows "Start" menu.

2 Clicks "Control Panel." The Control Panel opens up in a new window.

3 Click "Appearance and Personalization," and select "Folder Options.

4 Click the "View" tab near the top of the "Folder Options" window.

5 Click "Show hidden files, folders, and drives" from inside the "Advanced settings" scroll box. With this option selected, you will be able to view cookies on your computer, as the folder is normally hidden in Windows 7.

6 Click "OK" and return to the desktop.

7 Click on the "Start" menu again.

8 Click "Computer".  The Computer window opens in a new window.

9 Double-click on your main hard drive, typically labeled as the "C" drive.

10 Double-click on the "Users" folder.

11 Double-click on your user name from within the folder.

 

12 Double-click on the "App Data" folder. This folder is partially transparent because it is a "hidden" folder.

13 Double-click on the "Local" folder.

14 Double-click on the "Microsoft" folder.

15 Double-click on the "Windows" folder.

16 Double-click on the "Temporary Internet Files" folder. This folder contains all your cookies. Cookies are text files, so most of them open in Microsoft Notepad when you click on them. You can read basic identifying information in the Notepad to determine where the cookie came from.

How to View Cookies in IE7?

Temporary Internet files, also known as cookies, are data files that are saved on your computer's hard drive every time a Web page is visited using Internet Explorer. These files enable quicker access to previously visited Web pages by saving page preferences and form data on your computer. Cookies also provide a detailed history of Internet usage. View cookies stored on your computer's hard drive by accessing Internet options either through your IE7 browser or from your computer's Control Panel.

View Cookies through IE7

1 Open the Internet Explorer 7 browser.

 

2 Click "Tools" from the Command Bar at the top of the screen and select "Internet Options" from the drop-down menu.

 

3 Click on the "Settings" icon in the "Browsing History" section of the "General" tab.

 

4 Click "View Files" to view cookies in Windows Explorer.

Access Cookies through the Control Panel

1 Click the Windows "Start" button and open your Control Panel.

2 Click to open the "Network and Internet" screen.

3 Select "Internet Options" to access Internet options in a separate window.

4 Click "Settings" within the "Browsing History" section of the "General" tab.

5 Select "View Files" to view temporary Internet files.

 

How to View Websites Visited with History Erased

Whether you're trying to find a website you visited last week or are checking up on activity by someone using your computer, you can find a list of websites your computer has visited even if the browser history has been erased. This can reveal the home domain of sites visited and give you an idea of where the user has been while using your computer.

Please follow the below instructions:

1 Go to the Start menu in the bottom left corner of your computer screen and select the Control Panel.

2 Double-click the Internet Options icon; this will open a new dialog box. It will open under the General tab by default.

You can also perform this action by opening your Internet Explorer browser and selecting Tools, Internet Options from the menu.

3 Locate the Browsing History category under the General tab and click Settings. A new dialog box will appear; choose View Files.

4 Sift through the list of cookies and image objects this command brings up in the Temporary Internet Files window. The cookies have web addresses attached to them, which is basically the way a website leaves a calling card on your computer. The cookie should read something like "Cookie:[user]@visitedwebsite.com." The domain that comes after the @ sign is the website the user spent time on.

5 Choose whether you'd like to delete the cookies and other temporary Internet files or keep them. If you'd like to delete them, close out of the Temporary Internet Files window and select the Delete command from the Browsing History section. You can choose to delete cookies, passwords, entered search data and more. You can select Delete All to remove all Internet files in one sweep.

Consider if you or any other user will ever need those passwords again before you delete them, as some users don't have their passwords backed up to any other location and rely on their browser to save them. May Be This reply Is Helpful for you https://techcommunity.microsoft.com/t5/sharepoint/view-in-file-explorer-cookies-are-only-persistent-...-reviews.

Thanks @ChristianJBergstrom 

We have SSO so the KMSI won't come up. The persistent cookie won't expire at windows or user forced signout.

 

From your link "Session timeouts for Microsoft 365" it feel like the persistent cookie for View In FIle Explorer will expire after "SharePoint Online 5 days of inactivity". 

 

That could be irrelevant of the KMSI, any SSO or other settings. That could be an independant token between SO and Edge. I will record the last time I accessed SO from File Explorer and see if that lasts 5 days.

 

Maybe that is the design: Access the SO files from File explorer when you click the view in SO, while the connection will remain live depending on your settings, for up to 5 days.

@TonyWilson No worries, it's an interesting question so had to jump on it. Out of curiosity, have your org. configured persistent browser session and/or sign-in frequency using CA? Let me know the outcome of your testing if you have the time for it, thanks.

@ChristianJBergstrom 

We only have one policy, just forcing MFA to all users, excluding our internal IPs
No other condition is selected in that policy

TonyWilson_0-1641251404717.png

Besides that, we followed the documentation and added with powershell "Set-SPOTenant -UsePersistentCookiesForExplorerView $true" and then configured couple of local machines via the registry to have the view in file explorer dropdown in edge (verified that it was accepted in edge/policy)

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ConfigureViewInFileExplorer]
"1"="{ \"cookies\": [ \"rtFa\", \"FedAuth\" ], \"domain\": \"(TENANT).sharepoint.com\" }"
"2"="{ \"cookies\": [ \"rtFa\", \"FedAuth\" ], \"domain\": \"(TENANT)-my.sharepoint.com\" }"

Win AD 2016 and Azure (P1) AD Connect with User Sign-in Seamless sso enabled

So AD FS 2016 with PSSO enabled and testing on a registered device.

 

...which probably had more than 14 days not accessing SharePoint from file explorer, that could have killed the cookie.

 

Very interesting link and something to study tomorrow with the team :) I will test the 14 days now window (accessing with File Explorer those document libraries daily but leaving the OneDrive one alone for two weeks)

 

I now have better understanding of the view in File explorer vs OneDrive sync, where the latter is an app doing constant syncing and authentication (when it is working, lol), while the view in File explorer relies on cookies and FS to keep the link live, which at some point, sooner or later, it will have to be manually re-activated.

It was designed as an alternative view while you are in SharePoint anyway, not a permanent tool for file explorer :)

 

Thanks for pointing me to the right direction @ChristianJBergstrom  :)

@ChristianJBergstrom It requested to sign-in again after 8-9 days.

I used the file explorer daily for SharePoint and left OneDrive untouched.
On the 8th (or 9th) day, the file explorer connection to SharePoint was not happening (same with OneDrive)

So using it daily is not renewing the connection. I am just doing the same test again to verify if it is 8 or 9 full days (will try to access it an hour before and an hour after the 8th day anniversary.

@TonyWilson 

 

Is there any solution?

 

I found out that there are 2 cookies created in IE (not EDGE) the timeout is around 5 days. You cannot view the cookies, while cookies are now stored in a DAT file.

 

AllanBlucher_0-1644484161723.png

 

Maybe the cookies can be updated trough a script, every time the user logs on