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

%3CLINGO-SUB%20id%3D%22lingo-sub-2230941%22%20slang%3D%22en-US%22%3EUsing%20Login%2FPassword%20Hardcoded%20on%20Python%20to%20retrive%20FILES%20from%20Sharepoint%20Folder%20get%20me%20Error%20403%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2230941%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EIm%20currently%20trying%20to%20get%20a%20zip%20file%20from%20a%20Sharepoint%20folder%20to%20my%20Azure%20Blob%20storage.%20The%20SharePoint%20environment%20belongs%20to%20a%20partner%20company.%20I%20have%20a%20personal%20login%2Fpassword%20belonging%20to%20my%20Company(Not%20the%20Partner%C2%B4s)%20with%20permission%20to%20manually%20access%20this%20SPO%20site%20without%20any%20kind%20of%20VPN%20or%20MFA.%20I%20was%20trying%20to%20use%20Python%20code%20to%20authenticate%20to%20the%20site%20and%20download%20the%20files%20I%20need%20authomatically.%20But%20every%20library%20I%20use%2C%20it%20give%20me%20the%20403%20Error%20%22No%20Permission%22.%20Do%20I%20need%20to%20have%20a%20especial%20permission%20to%20use%20my%20login%20and%20password%20on%20a%20Python%20code%20to%20access%20the%20Sharepoint%3F%20Do%20I%20need%20to%20be%20included%20in%20some%20Role%20with%20specific%20permission%20to%20use%20my%20login%2Fpassword%3F%20If%20yes%2C%20which%20one%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2230941%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPermissions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2236620%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20Login%2FPassword%20Hardcoded%20on%20Python%20to%20retrive%20FILES%20from%20Sharepoint%20Folder%20get%20me%20Error%2040%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2236620%22%20slang%3D%22en-US%22%3EAre%20you%20sure%20Modern%20Authentication%20isn't%20enabled%2Frequired%3F%20That%20will%20block%20straight%20username%2Fpassword.%20This%20can%20be%20configured%20at%20the%20M365%20tenant%20level%20and%20SPO%20tenant%20level.%3C%2FLINGO-BODY%3E
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?