Office365-REST-Python-Client icon indicating copy to clipboard operation
Office365-REST-Python-Client copied to clipboard

User credential auth / no element found

Open amberzaragoza opened this issue 3 years ago • 3 comments

I am trying to run the following piece of code, which has always worked until recently:

client.web.ensure_folder_path(path).execute_query()

I am authenticating as follows:

client = ClientContext(url).with_credentials(UserCredential(username, password))

This is the error that I receive:

Traceback (most recent call last):
...
File "office365\runtime\client_object.py", line 41, in execute_query
File "office365\runtime\client_runtime_context.py", line 132, in execute_query
File "office365\runtime\client_request.py", line 92, in execute_query
File "office365\runtime\types\EventHandler.py", line 18, in notify
File "office365\sharepoint\client_context.py", line 192, in _build_modification_query
File "office365\sharepoint\client_context.py", line 151, in ensure_form_digest
File "office365\sharepoint\client_context.py", line 158, in get_context_web_information
File "office365\runtime\client_runtime_context.py", line 129, in execute_request_direct
File "office365\runtime\odata\odata_request.py", line 36, in execute_request_direct
File "office365\runtime\client_request.py", line 105, in execute_request_direct
File "office365\sharepoint\client_context.py", line 181, in authenticate_request
File "office365\runtime\auth\authentication_context.py", line 86, in authenticate_request
File "office365\runtime\auth\providers\saml_token_provider.py", line 77, in authenticate_request
File "office365\runtime\auth\providers\saml_token_provider.py", line 84, in ensure_authentication_cookie
File "office365\runtime\auth\providers\saml_token_provider.py", line 97, in get_authentication_cookie
File "office365\runtime\auth\providers\saml_token_provider.py", line 139, in _acquire_service_token_from_adfs
File "xml\dom\minidom.py", line 1998, in parseString
File "xml\dom\expatbuilder.py", line 925, in parseString
File "xml\dom\expatbuilder.py", line 223, in parseString
xml.parsers.expat.ExpatError: no element found: line 1, column 0

Do you have any ideas as to what could be happening or possible fixes?

amberzaragoza avatar Dec 28 '21 20:12 amberzaragoza

I’m getting the same error. Any solutions?

yipsmith avatar Mar 31 '22 19:03 yipsmith

Am facing the same issue as well :(

aihiangng avatar Aug 01 '22 03:08 aihiangng

I am getting the same error. Could you solve this issue, please?

loriegis avatar Apr 13 '23 15:04 loriegis