Office365-REST-Python-Client
                                
                                 Office365-REST-Python-Client copied to clipboard
                                
                                    Office365-REST-Python-Client copied to clipboard
                            
                            
                            
                        an error occurred while retrieving auth cookies 2.3.1
I am trying to read files from a sharepoint location.
1.) Does my site url need to be where the file I want to read is located 2.) I receive this error:
an error occurred while retrieving auth cookies from https://tenantprefix.sharepoint.com/_forms/default.aspx?wa=wsignin1.0
Below is my code which I added my credentials and tenant prefix
from office365.runtime.auth.user_credential import UserCredential
from office365.sharepoint.client_context import ClientContext
site_url = "https://{your-tenant-prefix}.sharepoint.com"
ctx = ClientContext(site_url).with_credentials(UserCredential("{username}", "{password}"))
web = ctx.web
ctx.load(web)
ctx.execute_query()
print("Web title: {0}".format(web.properties['Title']))
Using code that works fine in 2.2.0, I am now receiving the same error with 2.3.1.
We are federated with ADFS.
+1 Same issue here.
EDIT: Reverting back to 2.2.2 solved the issue.
Issue persists for 2.3.4. Reverting back to 2.2.2 did not solve the issue for me.