Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23276

Error 403: Access Sharepoint using App Credentials in Python

$
0
0

I am trying to access files stored in SharePoint using Python. I have registered the app in Azure Ad and have client_id and client_secret. I have given the read and write permissions however I am still getting 403 error.

I am not really sure as to what I am missing out on. below is the script:

`from office365.sharepoint.client_context import ClientContextfrom office365.runtime.auth.client_credential import ClientCredentialsite_url = ''app_principal = {'client_id': '','client_secret': ''}credentials = ClientCredential(app_principal['client_id'], app_principal['client_secret'])ctx = ClientContext(site_url).with_credentials(credentials)web = ctx.webctx.load(web)ctx.execute_query()`

I tried modifying permissions


Viewing all articles
Browse latest Browse all 23276

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>