I tried to map a network drive with the explorer option;

But I kept getting this error;
“Access Denied. Before opening files in this location, you must first add the web site to your trusted sites list, browse to the web site, and select the option to login automatically.”

So I did that, but it still wouldn’t work, duckduckgo it and followed these articles;

I also found this;
As I run Win8.1 with IE11, i turned on IE compatibility mode for the sites mentioned earlier.

So I tried the icon “open with explorer”, its a bit hidden in the Office365 ribbon (sorry for the dutch UI, the point is the icon though);

This opened a explorer view;

in non-breadcrum view (click on the white space behind it) this looks like;

And if i use this path in the map network drive, i get a successful network mapping!

I’m not sure which solution did the trick, but i have a mapped drive in my explorer, so that’s all i care about.


  1. Does the mapped drive work after you reboot?

  2. Dennis Pennings

    It sort of does.. The mapping is there after a reboot, but i have to reauthenticate (fill in my password) to access it.

    Some of us use a batchfile during startup with a user and password to avoid the reauthentication. Put the following line in a batchfile and put it in the startup menu folder;
    net use X: \\ORG.sharepoint.com@SSL\DavWWWRoot /user:domain\user password.

    1. Chris

      Hi Dennis,
      I hope you can help me out. We are a not for profit organisation hoping to use Office365 to improve our productivity etc. The problem is the organisation has 30 years of data over 80 thousand files to deal with and after researching online I found your blog (Office365 can only sync up to 20,000 files). Users at the main office will login into a shared Staff local account on desktops running Windows 7 Pro, would running a batch file for re-authentication be the best way to do it so the mapped Onedrive can be accessed as soon a user logs in without signing into Office 365? Many thanks, Chris

      1. Dennis Pennings

        The business version of Onedrive can hold more files than 20.000, just not per user. You have to sync to the right location (the business shared part i believe).

        But you have to authenticate to Office365 one way or the other. But if you mean that you don’t have to logon to the Office365 website and use your credentials in the batch, it’s possible. But I would encrypt the batchfile if you have not-managed accounts as the batch will require a plain text password. Or try the solutions Myles suggested (i haven’t tried them myself).

  3. Paul

    Hi, we’re faced with a similar situation – users wanting the convenience of a mapped network share, however as soon as they log off, the sharepoint drive is disconnected.

    Thanks for sharing this, i’ll give it a go.

  4. I encountered the same problem… After reading many blogs, articles, presentations, code samples… etc I decided to develop an utility being able to set the necessary SSO Cookies in an unattended way for domain PCs and servers.
    After running the utility you will be able to mount the share without user intervention with the usual “net use…”

    It’s the initial release, so no guarantee it will work in your environment…
    Anyway if you want to give a try, here is the link to my blog with source code and an exe version too.

  5. There are Powershell scripts available that automate the sign in process with Internet Explorer which stops the drives mappings from being dropped:



    Another option is a commercial solution called Zee Drive which does the same job of keeping you signed in and persisting the drive mappings between reboots Map network drives to OneDrive for Business and SharePoint Online document libraries – Reliably

    1. Dennis Pennings

      excellent! Thank you very much for sharing!

  6. URL

    … [Trackback]

    […] Read More here: 360ict.nl/blog/map-network-drive-to-office365-explorer-view/ […]

  7. Ghislain Gaillot

    The best and easier way I found to automated mount sharepoint/ondedrive shares as a network drive is Cookie365.

    The source code is available here: https://github.com/FabioCuneaz/Cookie365

    You juste need to compile to get the exe file and it works like a charm.

Leave a Reply

Your email address will not be published. Required fields are marked *