OneDrive Files On-Demand And Windows Storage Sense – Impact of Combining Two Features

Files On-Demand and Windows Storage Sense are both useful features that you should be using especially when paired together. Used independently, each behaves as expected.

However, in an enterprise with mobile users (traveling or working offline), enabling both can cause confusion: files that go unopened for 30 days may be automatically offloaded (made online-only) by Storage Sense. From the user’s perspective, it can seem like OneDrive deleted their files, prompting support tickets. The takeaway for this post is, both features working exactly as designed and not doing something wrong. It’s about understanding what is occuring, why, and how to setup your users for success.

How Files On-Demand Works

OneDrive Files On-Demand is on by default, as it should be, and displays all your cloud files in File Explorer, with icons indicating each file’s status:

This is a screenshot directly from the Files On-Demand documentation and the overlooked part is what I highlighted in red which is details about Windows Storage Sense. One of the main differences between the green check mark with a white background (locally available file) vs the full green check mark (always available file) is that Windows Storage Sense will not convert the full green check mark back to the blue cloud (online-only) potentially without you knowing.

By default, new files appear as online-only, and Windows downloads them only when the user opens them. For example, if you double-click an online-only document (with an internet connection), it downloads and becomes locally available. Then you can either personally choose to move it back to online only or keep it on your device. But why does this matter and what should the user know?

This is where there can be a disconnect between the OneDrive administrator, or decider of policies, and the Windows device management personnel.

How Windows Storage Sense Works

Windows Storage Sense is an automatic disk-cleanup feature native in Windows. When it runs, it can dehydrate local OneDrive files. This converts them them from locally available (green check mark with a white background) back to online-only (blue cloud) to free space. Microsoft’s docs explain:

“Any files that you haven’t used in the last 30 days can be set to online-only when your device runs low on free space. Storage Sense will only set files to online-only until there’s enough space freed…”.

In Windows 10/11, the default threshold is 30 days. That means if a user hasn’t opened a file in 30+ days and Storage Sense triggers (i.e. the disk is nearly full), the file will become online-only. That sounds reasonable until you apply it to real-world enterprise usage patterns:

  • A user has a folder of reference documents they haven’t opened in 35 days
  • Their laptop disk gets low during a large software update
  • Storage Sense runs, dehydrates those files to online-only
  • The user boards a plane or goes into a location without internet, opens their laptop, tries to access those documents
  • Nothing opens. Windows throws an error. The user panics

From the user’s perspective, this feels like OneDrive did something to their files. In reality, the file remains safely in the cloud but Windows just removed its local copy. The support ticket could then be phrased “OneDrive isn’t working.” The resolution is to ensure the device is online education to right-click the affected folder and choose Always keep on this device.

Why Known Folder Move (KFM) Amplifies the Issue

Known Folder Move (KFM) redirects Desktop, Documents, and Pictures into OneDrive. If you use KFM, and if you aren’t you should be, then Storage Sense can operate on those critical folders. For example, if a user’s entire Documents is in OneDrive and files there go unused for 30 days, OR if the device administrator set a different policy, OR if the device is running low on space, Storage Sense might offload them to online-only status. A user who then goes offline loses access to all their files in their Documents folder. In a KFM-enabled environment without awareness, it’s easy for users to lose offline access to files unless they mark them as always offline prior to travel or times you know you will be offline.

True story…one of the genesis of this post is due to a time I went onsite and couldn’t get on guest wireless and we were in a basement and hot spot wasn’t working and I couldn’t pull up a presentation.

Mitigation Strategies

The good news is there are several ways to control this behavior through policy. The bad news is admins may not know these exist.

Option 1: Disable Storage Sense via Intune or GPO

The nuclear option. If your users have enough disk space and you’d rather not think about, turn Storage Sense off. This is not what I recommend.

Via Intune (Settings Catalog):
Search for “Storage Sense” in the Settings Catalog and set Allow Storage Sense Global to Block.

Via GPO:
Computer Configuration > Administrative Templates > System > Storage Sense
Set Allow Storage Sense to Disabled

Option 2: Prevent Storage Sense from Dehydrating OneDrive Files

This is the better option for most companies. Keep Storage Sense running for general disk cleanup but stop it from touching OneDrive files.

Via Intune (Settings Catalog):
Search for “Storage Sense” in the Settings Catalog and set Config Storage Sense Cloud Content Dehydration Threshold to 0 (zero means never dehydrate).

Via GPO:
Computer Configuration > Administrative Templates > System > Storage Sense
Set Configure Storage Sense Cloud Content dehydration threshold to 0

Option 3: Use OneDrive’s Disk Space Threshold Policies

OneDrive has its own sync policies for managing disk usage that give you more granular control than Storage Sense. These work alongside each other if configured correctly.

Minimum disk space threshold in MB: OneDrive will pause syncing if available disk space falls below this value.

This can also be set via GPO with MinDiskSpaceLimitInMB.

Option 4: Pin Critical Folders as “Always Available”

For users whose roles require offline access to specific folders, you can set folders to always be available locally. This can be done by the user or scripted as part of your deployment.

1. Via user’s pinning it themselves by right clicking on the folder or file and selecting Always keep on this device.

This is what should be made into a KB article with details as to WHY to do this!

2. Via PowerShell (run on user’s device during something like a login script). This can be helpful for remote field workers required to use OneDrive sync when working offline in areas without internet service:

# Pin a specific OneDrive folder as always-available locally
# Replace the path with the actual OneDrive folder path on the device

$folderPath = "$env:USERPROFILE\OneDrive - Contoso\Important Documents"

if (Test-Path $folderPath) {
    # Use attrib to set the pinned state (U = unpinned, P = pinned)
    # OneDrive uses the file attribute to track pin state
    attrib +U -P $folderPath /S /D
    Write-Host "Folder pinned as always-available: $folderPath" -ForegroundColor Green
} else {
    Write-Host "Path not found: $folderPath" -ForegroundColor Red
}

Note: There’s no OneDrive policy to remotely pin specific user files or folders as always-available, which is a gap in the toolset.

What to Tell Your Help Desk

In the meantime while you are creating that KB article, if users are already hitting this problem, just have them:

  1. Ensure the device has an internet connection
  2. Navigate to the affected folder in Windows Explorer
  3. Right-click the folder and select Always keep on this device
  4. Wait for sync to complete

The files will re-download. Nothing was ever deleted. But you’re going to want to get ahead of this with policy and internal KBs. This is something that should be reviewed for what option(s) to do especially if you’re rolling out KFM.

The Bottom Line

This isn’t a bug. Both features are doing what they’re supposed to do. But in an enterprise environment where users travel, lose connectivity, or work from devices with constrained disk space, the combination of KFM + Files On-Demand + Windows Storage Sense without proper policy controls and education to users could raise support tickets.

Understand the Storage Sense policies, your device fleet, your OneDrive policies, and test your configuration before rolling to production. Your help desk may thank you in the future!

Upcoming SharePoint Management Webinar

I am excited to share that I will be presenting at the next ShareGate Pass the Mic webinar. I have been working with and being a SharePoint administrator in some form since 2010. I have seen so many different environments over my years of consulting that I have a unique understanding of what can be done well and what has been done poorly. The world of a SharePoint administrator has evolved exponentially since moving to SharePoint Online. The toolbox and processes that you need and should follow are not the same as the past.

So what does a modern SharePoint administrator need to know?

Join me for SharePoint power hour on April 14th 2022 at 10:00 a.m. CST and get actionable advice on managing SharePoint in Microsoft 365 for smooth day-to-day operations. 

Plus, find out what changes are coming to SharePoint in 2022 and how they’ll impact you and your organization. 

Bonus: Attend the live event and get a special surprise at the end of the webinar! 

Things you will learn:

  • Why you need to understand SharePoint’s structure to manage your environment successfully
  • Important tips to administering SharePoint Online like a pro  
  • Best practices for SharePoint provisioning and governance  
  •  How to reorganize and restructure your content for next-level collaboration

Register today!

Vlad & Drew Microsoft Cloud Webinar Series

There is a constant release of new Microsoft cloud technologies and it is hard to keep up to date. There can be features that are released and the not widely seen or there could be questions about that feature that aren’t answered with the initial release. We want to try to close that gap of knowledge.

Vlad Catrinescu and myself, Drew Madelung, have begun putting together a webinar series where we will be targeting Microsoft modern workplace technologies and doing deep dives into specific feature releases. We want to bring experts from Microsoft and the community to share the details of what is being released and break down into the technology to really try to help everyone understand what the feature is meant to do, can do, and answer any outstanding questions.

Please join us and spread the word for these webinars. If you missed one, make sure you watch the recording! And if you have any suggestions for topics to deep dive into please let Vlad or myself know.

Upcoming Webinars

Previous Webinars

August 25th – Modern records management in a new world of remote work with Microsoft 365

In this webinar we were joined by special guests Roberto Yglesias and Tina Ying covering the latest news in Microsoft 365 records management. Records management in M365 has many new features and capabilities that we highlighted in this webinar. We also discussed real-world conversations on use cases of moving to modern records management in M365 and the challenges, opportunities, and overall guidance for this process.

August 3rd – Introducing Microsoft Lists – Your smart information tracking app in Microsoft 365

In this webinar, we jumped into the new functionality and features of the brand new solution called Microsoft Lists. We discussed what Lists can be used for, how to work with them, and details around the timing and availability of Lists along with demos of Lists themselves! With our special guest Mark Kashman who joined us this was a great overall webinar with a ton of questions.

July 7th – Enabling Sharing & Collaboration in OneDrive & SharePoint

In this webinar, we dived into sharing and discussing how it works, how it can be managed, and what’s new and upcoming in the world of sharing and collaboration in OneDrive and SharePoint. We were joined by Stephen Rice from Microsoft as we break down the details and background of sharing.

June 16 – Evolution of Office 365 Groups to Microsoft 365 Groups

In this webinar, we’ll were joined by Mike McLean from the Microsoft 365 Groups product team to discuss the evolution of Office 365 Groups to Microsoft 365 Groups. We reviewed the Office 365 Groups journey, and provided a behind-the-scenes look at the vision and strategy around the platform. Mike also shared details on improvements recently shipped that enhance how groups are managed across the Microsoft 365 suite and through Microsoft Graph.

May 20 – Review of the new experiences of managed metadata services (taxonomy and content types)

We were joined by product managers Sean Squires and Anupam Francis covering updates to the managed metadata service in Microsoft 365! In this webinar we talked about the updates coming to the managed metadata service. This includes experience updates to the term store, a new admin content type gallery, and improvements to managed metadata columns in lists and libraries. We will also talked about the new REST and Graph APIs supporting taxonomy updates.

May 26 – Enabling Sensitivity Labels for SharePoint Sites, Teams, Office 365 Groups and Office files

We were joined by Senior Program Manager Sanjoyan Mustafi for a free webinar covering Sensitivity Labels across Office 365! In this webinar we talked about the upcoming features around enabling more Office 365 workloads with sensitivity labels. This included new abilities to classify the containers of Office 365 Groups, Microsoft Teams, and SharePoint sites and the ability to enable sensitivity labels for Office files in SharePoint and OneDrive.

March 10th – Deep Dive into SharePoint Online Multilingual

We had the pleasure to host a webinar with Senior Program Manager Divyachapan (DC) Padur, and Senior Software Engineer Matt Mooty from Microsoft for a deep in multilingual in SPO. Recording below and a great collection of questions and answers came from it that we posted.

April 9th – Deep Dive into OneDrive Known Folder move

We were joined by Principal Program Manager Gaia Carini from the OneDrive team at Microsoft to talk all about Known Folder move. Recording is below.

Looking forward to SPC20

We have turned the dial into a new century since the last big Microsoft event of 2019. We are now ready to look forward to 2020 and what the next big SharePoint Conference will bring.

Image

SharePoint Conference 2020 is coming back to Vegas May 19 – 21 at the MGM Grand. If you are are working with the Microsoft 365 collaboration world of SharePoint, Teams, OneDrive, Yammer, Stream & more than this is a great conference to find a way to get to. This is the biggest Microsoft collab specific conference every year with can’t miss sessions, learning opportunities and primarily networking with peers. There are 2 primary release timelines from Microsoft and that includes SPC in the spring and then Ignite in the fall. Register today as the sooner you do the more you save.

What can you expect at SPC20?

Sessions and Roadmaps

The primary reason we go to conferences is to learn about topics that interest us. SPC20 has a massive amount of great content lined up with amazing speakers from Microsoft and the community. This is one of the few conferences where there will be a plethora of Microsoft speakers talking about what’s coming. Some specific Microsoft sessions I am excited to attend include:

Partners & Products

Don’t skip the expo hall. To often I see companies trying to build their own custom solution for a problem they have. After you walk the expo hall at SCP20 you can most likely find a partner or product that can help you faster if you build it yourself. Microsoft 365 is built to be built on and the partner ecosystem is incredibly strong. Partners are becoming more important in a cloud first world because it is nearly impossible to keep up with the change we have in Microsoft 365. Now picture building something custom and then trying to keep that up to date with all the changes you see every week in the roadmap and other solutions in Microsoft 365. Partners are built to help support you through those hurdles so you don’t have to.

Take the time to learn about what is out there to help you. Spend a lunch talking to each vendor about what they do. I have had conversations where I didn’t know this vendor existed and by the time I was done I personally wanted to partner with them because I heard the strength of the uses cases it solved. Also you may have a chance to win some pretty cool prizes.

Networking

It’s not just you. The community that is built around this ecosystem is hard to describe. It is open, engaging, educational, and fun. We are all peers at these conferences and there is no better time to enjoy a lunch, a hello in the hall, or some after session conversations about who you are and the work that you are doing. Having a network to go to and share knowledge with will motivate you and excite you to get back to your day to day work. I have attended a large amount of conferences and this is always my favorite part. I have built lasing friendships and connections that have helped me through my career through networking at conferences. Some tips for networking:

  • Introduce and ask questions to your fellow lunch mates
  • Go to the MS booth area and just listen for a period of time (this is one of my favorite things to do)
  • When in a session earlier, ask people sitting next to you where they work and what they do
  • Stay after the session to listen to questions asked to speakers even if you don’t have any
  • Ask speakers questions wherever you are, they will help
  • Enjoy at least 1 night at a vendor or MS event after hours
  • Engage in Twitter before, during, and after the conference – nearly every speaker is on Twitter

My sessions!

I’m honored to be speaking again at SharePoint Conference. This is always a fun one to speak at because of the size and excitement throughout the week. I will be presenting 2 sessions this year:

Everything you need to know about sharing files in OneDrive, SharePoint & Teams

Sharing files is a necessity within the intelligent workplace and it is powered by SharePoint. Being able to understand how sharing is brought together across Microsoft 365 will help you plan, manage, support, and effectively drive adoption of SharePoint, OneDrive, and Microsoft Teams.

In this session, you learn learn what you can do with modern sharing experiences, how they work under the covers before and after you share a file, and what management options are available to you. Getting content securely to the right people at the right time keeps a company moving.

You can’t spell SharePoint without ‘Share’!

How To Automate Your Modern SharePoint Site Provisioning Solution

I am presenting this session with the one and only Vlad Catrinescu

Creating modern SharePoint sites only takes a second but what if you want to customize or control that process? It can be a challenge to keep up with all the sites in an organization and can affect support and governance a SharePoint environment. In this session, we will learn how to use Microsoft’s latest tools such as Site Designs, Site Scripts, PnP Site Provisioning, PowerApps and Flow to create a full Site provisioning system with custom templates, custom branding and easy approval before creation.

Image
Register today!

Find and Report on Existing Delve Blogs

With the announcement that Delve blogs will be retiring you may want to see what blogs exist in your tenant. Delve blogs create their own site collection but do not show up in the admin center or when you use the SharePoint PowerShell module and the Get-SPOSite cmdlet. Thankfully PnP Powershell does return this. I put together a PowerShell script to find blogs and put a report together including the number of posts.

First, install PnP PowerShell if you haven’t already. I recommend installing via the PowerShell gallery with the command:

  • Install-Module SharePointPnPPowerShellOnline

Here is a script to find and export the blog information using PnP Powershell. Ensure you fill in your own variables for your tenant and the file path.

try {

    #variables -> enter your own domain and output path
    $creds = Get-Credential
    $tenantadmin = "https://domain-admin.sharepoint.com"
    $outputfilepath = "c:\temp\delveblogexport.csv"

    #connect to tenant to get blog sites
    Connect-PnPOnline $tenantadmin -Credentials $creds
    $sites = Get-PnPTenantSite -Template POINTPUBLISHINGPERSONAL#0

    $resultsarray = @()

    #loop through sites to get details for blog
    foreach($s in $sites){
        Connect-PnPOnline $s.Url -Credentials $creds
        $list = Get-PnPList -Identity "Pages"
        $pagecount = $list.ItemCount
        $listlastmodified = $list.LastItemUserModifiedDate
        $contributor = Get-PnPGroupMembers -Identity "Contributors" | select Email

        #add to export object
        $obj = New-Object PSObject
        Add-Member -InputObject $obj -MemberType NoteProperty -Name DelveBlogUrl -Value $s.Url
        Add-Member -InputObject $obj -MemberType NoteProperty -Name BlogPageCount -Value $pagecount
        Add-Member -InputObject $obj -MemberType NoteProperty -Name LastModified -Value $listlastmodified
        Add-Member -InputObject $obj -MemberType NoteProperty -Name Email -Value $contributor.Email

        $resultsarray += $obj
        $obj = $null

        Disconnect-PnPOnline

    }
    #export results
    $resultsarray | Export-Csv -Path $outputfilepath -NoTypeInformation
    Write-Host "Complete" -ForegroundColor Green
}
catch
{
    Write-Host $_.Exception.Message -ForegroundColor Red
}

The results will include the URL of the site, the page count, last modified, and the email of the blog site owner.

If you want other details per page you can go directly to the pages library to view by applying “pPg/Forms/AllItems.aspx” to the blog site url. As an example:

When you go to the pages library you can download the posts. They exist in a JSON blob. This may be a good way to extract blog posts before they are removed via Microsoft.

To view the posts you will still go through “portals/hub/personal/drew” path vs “portals/personal/drew”.


Another path to get some of this information is through the User Profiles that exist. Each user profile includes a link to their Delve blog. So if you get all existing user profiles you can find where that value is filled in. The best way to get this at scale is through SharePoint search. I put together a script to do this as well. I included batching logic on the results which will be needed in large tenants as the max search results is only 500.

try
{
    #variables -> enter your own domain and output path
    $creds = Get-Credential
    $tenantadmin = "https://domain-admin.sharepoint.com"
    $outputfilepath = "c:\temp\delvebloguserprofileexport.csv"
    $returnproperties = @("PreferredName","AccountName","WorkEmail")
    $sourceid = "B09A7990-05EA-4AF9-81EF-EDFAB16C4E31"  #this is consistent across tenants
    $maxresults = 100
    $startrow = 0

    #connect to tenant to search
    Connect-PnPOnline $tenantadmin -Credentials $creds

    $resultsarray = @()
    Do{
   
        #perform search query
        $results = Submit-PnPSearchQuery -Query "*" -SourceId $sourceid -SelectProperties $returnproperties -StartRow $startrow -MaxResults $maxresults -SortList @{LastModifiedTime="Descending"} 
        $rowcount = $results.RowCount

        #loop through results in row
        foreach($res in $results.ResultRows){

            #get user profile properties
            $props = Get-PnPUserProfileProperty -Account $res.AccountName

            #check if blog site exists
            if($props.UserProfileProperties.'SPS-PointPublishingUrl' -ne ""){

                #add to export object
                $obj = New-Object PSObject
                Add-Member -InputObject $obj -MemberType NoteProperty -Name DelveBlogUrl -Value $props.UserProfileProperties.'SPS-PointPublishingUrl'
                Add-Member -InputObject $obj -MemberType NoteProperty -Name WorkEmail -Value $props.UserProfileProperties.WorkEmail
                $resultsarray += $obj
                $obj = $null
            }
        }
        $startrow = $startrow + $rowcount + 1
    }
    while ($rowcount -ne 0)
    
    #export results
    $resultsarray | Export-Csv -Path $outputfilepath -NoTypeInformation
    Write-Host "Finished" -ForegroundColor Green
}
catch
{
    Write-Host $_.Exception.Message -ForegroundColor Red
}

This is not the most efficient way to get this information but it could be helpful to double check the SharePoint sites approach. This is also a handy way to loop through user profiles via search.