Get-Acl WebDAV error because of @SSL
After connecting to a SharePoint Online site or a OneDrive 4 Business site as a external drive (https://support.microsoft.com/en-us/help/2616712/how-to-configure-and-to-troubleshoot-mapped-network-drives-that-connec) you get an code 1 error when executing Get-Acl on this WebDAV path. I assume is because of the @SSL part in the path.
Steps to reproduce
Get-Acl -Path \customer-my.sharepoint.com**@SSL**\DavWWWRoot\personal\user_customer_com\Documents
Expected behavior
Acl's are returned for the item (file or folder).
Actual behavior
error code 1 is returned. "Get-Acl : Method failed with unexpected error code 1."
@tedescomicchioutlook Please include the output on $PSVersionTable and the method with which you are mapping the SharePoint WebDAV drive.
Here the output:
PSVersion 5.1.16299.98 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.16299.98 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
After having loaded a SharePoint Online site (or my OneDrive 4 Business site) with Internet Explorer 11 I get an option saying "open with Explorer". This opens a new Explorer window listening the content of my site. Then I can open a new PowerShell console windows from the URL of the Explorer window by typing "powershell". After all this steps I find myself in a new PowerShell window with the ability to to "things" with the content of the site I earlier browsed.
Does this help?
Are you able to reproduce this issue with PowerShell Core 6.0.1? This repository is for PowerShell Core issues only. For Windows PowerShell, please use the Windows PowerShell UserVoice.
Though, I don't think ACL's work with WebDav anyway... SharePoint permissions are a different beast.
hi - Yes, I am able to repro the exact same error also with PowerShell Core 6.1 on windows 10 64 bit.
PSVersion 6.0.1 PSEdition Core GitCommitId v6.0.1 OS Microsoft Windows 10.0.16299 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
Could you have a look at this? If you say that this could be potentially related to SPO, do you have some tests running to check SSL works with non-SPO webdav calls? :-) Thanks :-)
I still don't think ACL's are supported over WebDav on SharePoint or OneDrive. They do not use file system ACLs. You probably need to manage those with CSOM or the PnP modules.
I also don't have ant HTTP (no S) WebDav to test with and I hope that such a beast doesn't exist.
As further evidence that ACLs are not supported: from explorer right click a WebDav file and chose properties. You will notice there is no security tab.
Thanks for your valuable feedback @markekraus ! I will reach out the the team via UserVoice to understand how to retrieve ACLs for SPO and OD4B. This issue can be closed. Best