Using Login/Password Hardcoded on Python to retrive FILES from Sharepoint Folder get me Error 403

Occasional Contributor

Im currently trying to get a zip file from a Sharepoint folder to my Azure Blob storage. The SharePoint environment belongs to a partner company. I have a personal login/password belonging to my Company(Not the Partner´s) with permission to manually access this SPO site without any kind of VPN or MFA. I was trying to use Python code to authenticate to the site and download the files I need authomatically. But every library I use, it give me the 403 Error "No Permission". Do I need to have a especial permission to use my login and password on a Python code to access the Sharepoint? Do I need to be included in some Role with specific permission to use my login/password? If yes, which one?

 

2 Replies
Are you sure Modern Authentication isn't enabled/required? That will block straight username/password. This can be configured at the M365 tenant level and SPO tenant level.
Hi Trevor,
Thank you for the reply. Currently I´m able to access the Sharepoint site via Browser just with a login/Password with no need for VPN or MFA. I could log from any machine or IP. There is no restrictions there. My restriction is when I try to connect using Python library. Thats when I get the error. Since I´m not very familiar with Sahrepoint Settings, I was not sure if I need to a specific permition or if the Sharepoint needed to activate some feature to allow me this. I looked Modern Authentication up and it seemed related to MFA, which is not the case for these site. Did I misunderstood Modern Authentication?