Office365-REST-Python-Client
Office365-REST-Python-Client copied to clipboard
Term Store Error
- I'm trying to do a simplet get to the term store but I get that error. Does anyone have an example?
from office365.sharepoint.client_context import ClientContext
from office365.runtime.auth.user_credential import UserCredential
site='https://xxxxxxxxxxxxx.sharepoint.com/sites/xxxxx'
username = 'xxxxxxxxxx'
password = 'xxxxxxxxxx'
client_credentials = UserCredential(username, password)
ctx = ClientContext(site).with_credentials(client_credentials)
term_store = ctx.taxonomy.term_store.get().execute_query()
print(term_store)
office365.runtime.client_request_exception.ClientRequestException: ('notAllowed', 'OAuth only flow is enabled and the call has not been issued from an app.', '403 Client Error: Forbidden for url: https://xxxxxxxxxxxx/sites/sandbox/Vodanovic/_api/v2.1/termStore')