What is Curl?
Example

Cause
Resolution
The below diagram illustrates the HTTP requests which need to be made in order to authenticate SharePoint Online.

Applies To
Execution Steps
- Download the BashSPOLFileDownload.sh file from here.
- Open BashSPOLFileDownload.sh file in a text editor(TextWrangler/TextMate) and update the UserName (Line #4) and Password (Line #5).

Note
The username & password provided should have access to download the file from SharePoint Online.
- To download the file from a different SharePoint Online site/library/folder/file where the account has access, change the values of EndPoint(Line #6) and FileServerRelativeUrl(Line #7) values.
- Save the BashSPOLFileDownload.sh file
- Open Terminal (command line tool) and go to the path where BashSPOLFileDownload.sh file is saved
- Execute the following command to convert the BashSPOLFileDownload.sh file executable chmod 700 BashSPOLFileDownload.sh
- Run the script using just the name of the script(Example : ./ BashSPOLFileDownload.sh)
- If all goes well, you should be able to see the downloaded file in the output path given in OutputFilePath(Line #9).
Failure Chances
- Username and Password provided might be wrong
- Access denied from SharePoint Online for the UserName and Password provided
- Provided Site/Document Library/Folder/File is not available in SharePoint Online or wrong
- Text Editor might have changed or corrupted the BashSPOLFileDownload.sh file while saving


Otto FitPosted Jun 15, 2020, 5:09 AM EDT
Any insights on how to download externally shared files from SharePoint online, for URL protected with a password?
Muthu KumarPosted Feb 13, 2019, 6:17 PM EST
Nice Article..
Muthu KumarPosted Feb 13, 2019, 6:16 PM EST
Nice one. Thanks for sharing... Keep doing well...