You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
m365 file list --folderUrl "/sites/somesite/Shared Documents/" --webUrl "https://contoso.sharepoint.com/sites/somesite" --verbose
While excluding the trailing slash does work:
m365 file list --folderUrl "/sites/somesite/Shared Documents" --webUrl "https://contoso.sharepoint.com/sites/somesite" --verbose
CLI for Microsoft 365 version
6.4 (next)
nodejs version
16.15.0
Operating system (environment)
Windows
Shell
PowerShell
Additional Info
The error is caused by the url manipulation here. documentLibraryRelativeFolderUrl probably contains /. Which causes the URL to include root: instead of the expected root.
Doesn't regex seems a bit like an overkill (mostly for readability)? Couldn't you add an if-statement using endsWith('/') and if true then do string.slice(0, -1)? Seems more readable for newer developers and performance-wise will execute faster than a regex
Description
The following script throws an error:
While excluding the trailing slash does work:
CLI for Microsoft 365 version
6.4 (next)
nodejs version
16.15.0
Operating system (environment)
Windows
Shell
PowerShell
Additional Info
The error is caused by the url manipulation here.
documentLibraryRelativeFolderUrl
probably contains/
. Which causes the URL to includeroot:
instead of the expectedroot
.The text was updated successfully, but these errors were encountered: