Access SharePoint Online via REST API RRS feed

  • Question

  • Hi!


    I'm trying to use REST API to access company SharePoint Online in Python.


    For instance, the SharePoint folder I want to access is: I have access to the site, and the folder, but no access to the company root.


    I tried two methods:

    Option 1: HttpNtlmAuth

    domain =  ''

    url = '\'Sandbox\')/items'

    actual_username = domain + username

    response = requests.get(sharePointUrl,auth= HttpNtlmAuth(actual_username,password))


    Option 2: sharepy

    s = sharepy.connect("")


    But both of them fails, and I get either 403, Forbidden, or 401 Client Error: Unauthorized for url.


    Can anyone help to check what might be the issue here?


    Thanks in advance!



    Friday, June 7, 2019 12:09 AM

All replies