Replies: 1 comment
-
Thank you for reaching out and sorry to hear you're running into issues. Could you please run the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
m365Problem.txt
Hi all,
I'm trying to use Linux command line to upload files to Sharepoint. I followed https://pnp.github.io/cli-microsoft365/ to use m365 API and it does not work so far.
See more details in the attached error log m365Problem.txt. Below are the highlights of cmds and results:
m365 spo file list -u 'https://companyname.sharepoint.com/sites/Team/' -f 'Logs' --verbose --debug
List file not work. Did not show error but did not show the right file/folders either. It returned an empty list.
m365 spo file list -u 'https://companyname.sharepoint.com/:f:/r/sites/Team/Shared%20Documents/Logs?csf=1&web=1&e=Y785GK' -f 'test' --verbose --debug
List file error.
Error: 401 UNAUTHORIZED
m365 spo file add -u 'https://companyname.sharepoint.com/:f:/r/sites/Team/Shared%20Documents/Logs?csf=1&web=1&e=Y785GK' -f 'test' -p './m365.sh' --verbose --debug
Add file error. I already created "test" folder in the above link.
"Could not create sub-folder /:f:/r/sites/Team/Shared%20Documents/Logs?csf=1&web=1&e=Y785GK/test"
Error: 401 UNAUTHORIZED
m365 spo file add -u 'https://companyname.sharepoint.com/:f:/r/sites/T
eam/Shared%20Documents/Logs?csf=1&web=1&e=Y785GK' -f 'test2' -p './m365.sh' --verbose --debug
Add file error. I did NOT create "test2" folder in the above link.
"Could not create sub-folder /:f:/r/sites/Team/Shared%20Documents/Logs?csf=1&web=1&e=Y785GK/test2"
Error: 401 UNAUTHORIZED
https://companyname.sharepoint.com/sites/Team and https://companyname.sharepoint.com/:f:/r/sites/Team/Shared%20Documents/Logs?csf=1&web=1&e=Y785GK are the Sharepoint links that I want to use a script/cmdline to upload logs automatically. I have been doing that manually using the Sharepoint website GUI (which worked fine).
Anyone comment on why did I get "Error: 401 UNAUTHORIZED"?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions