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