Since basic user authentication is going away I need to update my auth process. I have tried multiple times but it doesn’t seem to work.
JavaScript
x
17
17
1
from office365.runtime.auth.authentication_context import AuthenticationContext
2
from office365.sharepoint.client_context import ClientContext
3
from office365.sharepoint.files.file import File
4
5
url = "https://test.sharepoint.com/sites/test001"
6
client_id = ""
7
client_secret = ""
8
9
context_auth = AuthenticationContext(url)
10
context_auth.acquire_token_for_app(client_id=client_id, client_secret=client_secret)
11
12
ctx = ClientContext(url, context_auth)
13
web = ctx.web
14
ctx.load(web)
15
ctx.execute_query()
16
print("Web site title: {0}".format(web.properties['Title']))
17
I have registered an app In azure with permissions.
I’m trying to use all the different values I can find here to set client_id and client_secret.
Any tips on how to get access by this method or another with the use of Office365-REST-Python-Client?
https://github.com/vgrem/Office365-REST-Python-Client
Advertisement
Answer
problem was solved with a new update in the library: