How to Fix “Access Denied” Error When Mapping SharePoint as Network Drive on Windows 8


2 views

When attempting to map a SharePoint Online document library as a network drive on Windows 8 using either File Explorer or the NET USE command, users frequently encounter two specific errors:

1. "The folder you entered does not appear to be valid"
2. "System error 224: Access Denied. Before opening files..."

Even after adding the SharePoint site to Internet Explorer's Trusted Sites zone, the authentication challenge persists due to modern authentication requirements in Office 365.

The root cause stems from several technical limitations:

  • Windows 8's WebClient service uses outdated WebDAV protocols
  • Office 365 enforces modern authentication (OAuth 2.0)
  • SharePoint Online requires specific URL formatting for WebDAV access

Here's the complete step-by-step resolution:

# PowerShell script to configure required settings
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WebClient\Parameters" -Name "BasicAuthLevel" -Value 2 -Type DWord
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\sharepoint.com" -Name "https" -Value 2 -Type DWord
Restart-Service WebClient

Then map the drive using this exact format:

net use * "https://mypublicserver.sharepoint.com@SSL/DavWWWRoot/sites/MySite/MyLibrary" /user:your.email@domain.com

For developers needing programmatic access, consider these options:

// C# example using CSOM
ClientContext ctx = new ClientContext("https://mypublicserver.sharepoint.com");
ctx.Credentials = new SharePointOnlineCredentials("user@domain.com", securePassword);
Web web = ctx.Web;
ctx.Load(web.Lists);
ctx.ExecuteQuery();

Or using REST API:

// JavaScript AJAX call
fetch('https://mypublicserver.sharepoint.com/_api/web/lists', {
  headers: {
    'Accept': 'application/json;odata=verbose',
    'Authorization': 'Bearer ' + accessToken
  }
})
  • Always use the complete path including "/DavWWWRoot"
  • Modern authentication requires Office 2013 or later
  • Consider using OneDrive sync client for better reliability
  • For automated scripts, store credentials securely using Windows Credential Manager

When attempting to map a SharePoint Online document library as a network drive on Windows 8, you might encounter "System Error 224" even after adding the site to Trusted Sites. This occurs because Windows 8's WebClient service has specific requirements for modern authentication.

First verify these components:

# PowerShell check for WebClient service
Get-Service WebClient | Select Status, StartType
# Should return "Running" and "Automatic"

Add these registry entries to enable modern auth:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters]
"BasicAuthLevel"=dword:00000002
"BasicCredentialPublisher"=dword:00000001
"UseBasicAuth"=dword:00000001
"ExtendedProtectionLevel"=dword:00000000

If registry edits don't resolve it, try these approaches:

Method 1: Using net use with credentials

net use Z: "https://myPublicserver.sharepoint.com/personal/username_domain_com/Documents" /persistent:yes /user:yourusername@domain.com *

Method 2: PowerShell script

$spSite = "https://myPublicserver.sharepoint.com/sites/yoursite"
$driveLetter = "Z:"
$credential = Get-Credential
$path = "$spSite/Shared Documents"

try {
    New-PSDrive -Name $driveLetter -PSProvider FileSystem -Root $path -Credential $credential -Persist
    Write-Output "Drive mapped successfully"
}
catch {
    Write-Error "Mapping failed: $_"
    # Additional troubleshooting:
    Test-NetConnection -ComputerName myPublicserver.sharepoint.com -Port 443
}

If you still face issues, reset the WebClient service:

# Stop and reconfigure service
Stop-Service WebClient -Force
Set-Service WebClient -StartupType Automatic
Start-Service WebClient
# Verify TCP ports are open
Test-NetConnection -ComputerName myPublicserver.sharepoint.com -Port 443

For Windows 8, consider using the OneDrive for Business sync client instead:

  1. Install latest OneDrive client
  2. Navigate to your SharePoint library
  3. Click "Sync" in the toolbar
  4. Authenticate when prompted

When mapping drives:

  • Ensure TLS 1.2 is enabled in Windows 8
  • Verify your firewall isn't blocking REST API calls
  • Check if conditional access policies are interfering
# Check TLS settings
[System.Net.ServicePointManager]::SecurityProtocol = 
    [System.Net.SecurityProtocolType]::Tls12