Error authenticating against Office 365. Error from Office 365:
See original GitHub issueHello everyone, I’m trying to upload some files to SharePoint in Office 365 but the authentication fails even though that I put the right credentials.Here’s the code:
from shareplum import Site
from shareplum import Office365
from shareplum.site import Version
#get all the csv files
csv_files = list(filter(lambda x: '.csv' in x, os.listdir('./csvfiles')))
# Office 365 Authentication
authcookie = Office365('https://tenant.sharepoint.com',
username='login@tenant.com', password='password').GetCookies()
site = Site('https://tenant.sharepoint.com/sites/Folder',
version=Version.v365, authcookie=authcookie)
However, I do manage to log in and upload data with my personal account, but I can’t upload data with my organizational account Here’s the message error when I try to log with my organizational account:
raise Exception('Error authenticating against Office 365. Error from Office 365:', message[0].text)
Exception: ('Error authenticating against Office 365. Error from Office 365:', 'AADSTS50126: Error validating credentials due to invalid username or password.')
Is there any way to fix it?
Thanks in advance
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:32 (5 by maintainers)
Top Results From Across the Web
python - Exception: Error authenticating against Office 365 ...
I trying to download the files from Microsoft office ...
Read more >Access Denied when you connect to Microsoft 365 - Office 365
To fix this problem, reset the user's password. To do this, follow these steps: Open a web browser, browse to the Microsoft 365...
Read more >FIX: Outlook Authentication with Office 365 Fails. (Solved)
So, the first method to solve the authentication issue to Office 365, in Office desktop applications, is to install the Missing Packages for...
Read more >When I try to "Sign in with Microsoft" I am getting a "Cannot ...
Ensure the Username and Primary email address fields match in the Microsoft admin settings. · The Office 365 email admin needs to enable...
Read more >Office 365: Unable to Authenticate Your Credentials
How to Fix Office 365 Credential Authentication Errors · 1. Enable TLS 1.2 · 2. Check your user name format · 3. Disable...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I vote for closing this issue. Multi-factor authentication has been created to prevent automated login. If someone wants to automate data storage in SharePoint then they should ask IT Team to create exception for the login account. Trying to solve multi-factor authentication could be out of scope of your work.
Try setting verify_ssl=False in your site object. Site(verify_ssl=False)
On Tue, Apr 28, 2020, 1:00 AM vennamanand1 notifications@github.com wrote: