The Mysterious Files Folder and its Importance to Office 365 Apps

Office 365 with Teams

The Importance of Files to Office 365

Microsoft introduced the Files folder to Exchange Online mailboxes in 2015. Files is a system folder, meaning that it is in every mailbox. The idea behind the folder is that it holds information about files that the user might be interested in, including attachments that received in email, “cloudy attachments” added to outbound messages or received inbound, hyperlinks in email, and files from SharePoint Online and OneDrive for Business that the user recently worked with.

An example of how clients use this data is when you select Files for an Office 365 group in OWA. The information presented comes from the Files folder in the group mailbox. Another is the “Your recent documents” list presented in Delve (Figure 1), which you can view by documents and attachments, just attachments, or just documents.

Delve Recent Documents
Delve lists recent documents (image credit: Tony Redmond)

Still another is the SharePoint home page, which presents users with information about documents they have recently worked with or viewed in different sites. Finally, there’s the Office 365 People card, which includes details of emails and files shared by a user when someone views their profile.

The Reason for Files

In all cases, the need exists for fast access to information. No one wants to wait while Office 365 consults SharePoint Online, OneDrive for Business, and Exchange Online to figure out what information to display. Keeping copies of relevant information gathered from different sources in the Files folder allows applications to execute efficient and fast queries.

The Insights API

Office 365 applications generate views about recent user activity with the Insights API, part of the Microsoft Graph.. The API makes calculated insights into what users do available to applications. Background assistants update the Files folder based on the insights to know what data to gather into Files. Some extra data in Files comes from local interaction with Office applications. Apart from adding data to Files, the background assistants also clear out old data as items are removed from libraries or users lose access to documents.

Cloud-Only Files Folders

Files is a hidden folder that only exists in cloud mailboxes (the same name applies no matter what language you run Office 365 in). You should never see Files appear in a client like OWA or Outlook. If you try to create a folder called Files, the clients tell you that the folder already exists, even if no trace of Files shows up in the folder list.

The fact that the Files system folder exists creates the possibility that you might move some on-premises mailboxes to Exchange Online that already have a Files folder. When this happens, the background agents will hide the user-created Files folder and begin to use it to store system data. The user data is still there; it’s just hidden from view.

To fix the problem, you can run the MFCMAPI utility to reset the PR_ATTR_HIDDEN property to False to force Exchange to reveal the folder again. This is only a temporary condition as the background agent will eventually detect that the Files folder is viewable and reset the property to hide the folder again. However, the mailbox owner will have the opportunity to create a replacement folder and move the items there.

Microsoft’s long-term fix is to use a new system folder for Files data that has a name unlikely to clash with any user-created folder. The process to changeover to the new folder will happen over the next few months.

The Many System Folders in a Mailbox

An Exchange Online mailbox holds many different folders. There is default set of folders that are in every mailbox, such as Inbox, Sent Items, Junk Email, Drafts, Conversation History, Deleted Items, and so on. These folders exist in a section of the mailbox under the Top of Information Store root folder along with user-created folders. Top of Information Store is a name that goes back to the first version of Exchange.

System folders usually exist in at the same level as the Top of Information Store. Here you find folders used to hold the synchronization settings for ActiveSync, to track commitments noted by MyAnalytics, and many folders used to track the interaction between the mailbox and the server. Some system folders are sub-folders under Top of Information Store. Exchange hides these folders and users are unaware of their presence.

Depending on the age of a mailbox, some system folders that you might find relate to long-forgotten functionality and are now obsolete. New folders appear as time goes on because of new functionality introduced by Microsoft. For example, Teams uses  the Team Chat folder of participant or group mailboxes to hold compliance records. Because of the trend to use mailbox folders to store system data within Office 365, Exchange Online mailboxes have more system folders than on-premises mailboxes do.

System folders are usually only available online and Outlook does not synchronize their contents to its OST. This is logical because they are used by services. Another point is that system folders do not count against user mailbox quotas. No matter how much data Office 365 squirrels away in your mailbox, you still have access to the full 100 GB.

Exploring Files

The Files folder is only available online. However, the folder is visible to the Get-MailboxFolderStatistics cmdlet, so you can get an idea of how much it holds. Here’s what is in my folder.

[PS] C:\> Get-MailboxFolderStatistics -id TRedmond | ? {$_.Name -eq "Files"} | Select Name, ItemsInFolder, FolderSize

Name  ItemsInFolder FolderSize
----  ------------- ----------
Files          5208 634.5 MB (665,287,869 bytes)

5,208 items is quite an amount. Let’s see what might be in there. Because the folder is unavailable offline, you must configure your Outlook (MAPI) profile to work online before firing up MFCMAPI to poke around the folder contents.

Start MFCMAPI and connect to your mailbox. Expand the folder list and find Files and then double-click to see details of the items in the folder. Figure 2 shows the properties of an item in the MRU list. In this case, we can see that the item properties include pointers to the SharePoint document library holding the file.

Figure 2: Viewing an object stored in the Files folder with MFCMAPI (image credit: Tony Redmond)

Using MFCMAPI to examine mailbox contents is a great way to learn what exists in a mailbox. However, you should not change anything unless you know what you are doing. Updating items with MFCMAPI is akin to performing surgery on the mailbox without the benefit of the restraints applied by client user interfaces.

Apart from potentially disabling functionality or causing poor performance, you will receive little sympathy from Microsoft support if you present them with a mailbox crippled by some “small changes” you made with MFCMAPI.

A New Role for Exchange

Using mailboxes as a cache for user data used by Office 365 applications is a great example of the different role played inside Office 365 by the two base workloads, Where Exchange and SharePoint are centers of on-premises ecosystems, inside Office 365 they offer functionality that applications can call upon as needed. The world is changing…

Follow Tony on Twitter @12Knocksinna.

Want to know more about how to manage Office 365? Find what you need to know in “Office 365 for IT Pros”, the most comprehensive eBook covering all aspects of Office 365. Available in PDF and EPUB formats (suitable for iBooks) or for Amazon Kindle.