Relative Content

Tag Archive for pythonsharepoint

Unauthorized client error when trying to connect to Sharepoint

I want to connect to a Sharepoint directory to overwrite a file there on a schedule. First I need to connect to the site, but I’m getting an unauthorized_client error and a message stating there might be an issue with the tenant. My code is below, based on examples I’ve found online. I didn’t grok how to construct the site_url, but I’ve tried many values for that variable. Do you know how I can connect to my Sharepoint site using a client_id, client_secret, and tenant_id?