Office365-REST-Python-Client
Office365-REST-Python-Client copied to clipboard
AttributeError: 'NoneType' object has no attribute 'text' : version 2.1.4
I am trying to download the file from sharepoint for which I am authenticating using username and password.
Here is the code which I have tried:
sp_base = 'https://<company>.sharepoint.com/sites/test/'
from office365.runtime.auth.authentication_context import AuthenticationContext
from office365.sharepoint.client_context import ClientContext
ctx_auth = AuthenticationContext(sp_base)
ctx_auth.acquire_token_for_user(username,password)
context = ClientContext(sp_base, ctx_auth)
But when I run this I am getting this error :
return token.text AttributeError: 'NoneType' object has no attribute 'text'
Hi,
Probably your company has enabled a federated authentication with SAML. Mine did and I end up with the same error message.
Regards, Eric
Did you manage to get around this issue Eric?
I am facing this issue when running from a Linux machine, from a windows Vm this is working as expected. Any updates