Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
from office365.runtime.auth.authentication_context import AuthenticationContext
from office365.sharepoint.client_context import ClientContext
from office365.sharepoint.files.file import File
from openpyxl import load_workbook
url = "https://<org>.sharepoint.com/sites/<site>/"
ctx_auth = AuthenticationContext(url)
ctx_auth.acquire_token_for_user(<secret>, <secret>)
ctx = ClientContext(url, ctx_auth)
response = File.open_binary(ctx, "/sites/<site>/<file>")
Solved! Go to Solution.
The issue is that the Sharepoint site requires the https:// at the beginning of the hostname.
The issue is that the Sharepoint site requires the https:// at the beginning of the hostname.
I used to be able to create connections to sharepoint via the sharepoint folders connection type. I am no longer able to do this. I get an error that I can't be authenticated with the provided credentials.
Go to Global Data Source Settings and remove all Sharepoint entries. Then re-authenticate in your query.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.