3

When I am trying to map a network drive via command prompt, I receive the following error for both user and administrator. The credentials are obviously correct and the admin user is also site collection owner with full control permissions (WebDav as well).
I can map a network drive without issue via explorer>rightclick>map a network drive. I can also open the library in explorer. Sharepoint is added to trusted sites. Tested on two Windows 8 computers, cannot test on Win7 at the moment.

C:\Users\Admin>net use r: "https://domain.sharepoint.com/sites/codesite/example/Shared Documents" Password /user:admin@domain.onmicrosoft.com
System error 1244 has occurred.

The operation being requested was not performed because the user has not been authenticated.

Any ideas what I am doing wrong?

EDIT: I have tried on Windows 7 both at work and now at home (guys, it's Friday night). At work same issue. At home I received first system error 224 "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." After editing registry key HKLM\SYSTEM\CurrentControlSet\Services\WebClient\Parameters BasicAuth=2 to accept non SSL connections I began getting the initial 1244 error.

Seeing that I managed to reproduce the issue on 2 different networks and systems, I have to ask: is such mapping/authentication supported by Sharepoint Online? If no, what is the difference between manual mapping and cmd mapping that prevents it?

  • I WAS able to map it, but since I'm using a different domain\user to log into SharePoint, I got asked for the password every time I try to open a doc (even if I tick "Remember my credentials". Since I'm trying to use it to do an automation, I need to get rid of the log in being asked every time I've try and open a document. Any idea of how can I ahieve that? – Martín Alejandro Carmona Selva Apr 27 '18 at 11:08
5

The problem is the URL format that you are providing to the net use command.

Take a look at the PowerShell script here http://www.lieben.nu/numb3rs/?page_id=129 which automates mapping a drive letter.

You will see the format of the parameter is like this:

\\domain.sharepoint.com@SSL\DavWWWRoot\sites\codesite\example\Shared Documents

If you would consider a commercial solution for drive mapping then take a look at Zee Drive which should simplify the whole process of drive mapping to SharePoint Online http://www.thinkscape.com/Map-Network-Drives-To-Office-365-OneDrive/

Disclosure: Zee Drive is a tool my company develops

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.