You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if not os.path.exists(local_path):
os.makedirs(local_path)
files = folder.files
ctx.load(files)
ctx.execute_query()
for file in files:
download_path = os.path.join(local_path, file.name)
with open(download_path, "wb") as local_file:
file.download(local_file)
ctx.execute_query()
print(f"File downloaded: {download_path}")
except Exception as e:
print(f"An error occurred: {e}")
Hello!
Has anyone encountered an authentication issue recently using the Office365 library?
ERROR:office365.runtime.auth.providers.saml_token_provider.SamlTokenProvider._process_service_token_response:Cannot get binary security token for from https://login.microsoftonline.com/extSTS.srf
An error occurred: Cannot get binary security token for from https://login.microsoftonline.com/extSTS.srf
site_url = ""
username = ""
password = ""
ctx_auth = AuthenticationContext(url=site_url)
if not ctx_auth.acquire_token_for_user(username=username, password=password):
exit(1)
ctx = ClientContext(site_url, ctx_auth)
def download_files_from_folder(folder_url, local_path):
try:
folder = ctx.web.get_folder_by_server_relative_url(folder_url)
ctx.load(folder)
ctx.execute_query()
folder_url = ""
local_path = ""
download_files_from_folder(folder_url, local_path)
Is there anything that has changed or that I'm missing ?
The text was updated successfully, but these errors were encountered: