【发布时间】:2019-10-23 05:32:47
【问题描述】:
通过 rest api 访问共享点时遇到问题。
嗨!
我正在尝试使用 REST API 在 Python 中访问公司 SharePoint Online。
例如,我要访问的 SharePoint 文件夹是:https://company.sharepoint.com/sites/sitename/foldername。我可以访问网站和文件夹,但无法访问公司根目录。
我尝试了两种方法:
选项 1:HttpNtlmAuth
域 = 'https://company.sharepoint.com/'
url = ' https://marvell.sharepoint.com/sites/sse/_api/web/lists/GetByTitle(\'Sandbox\')/items'
actual_username = domain + username
response = requests.get(sharePointUrl,auth= HttpNtlmAuth(actual_username,password))
选项 2:sharepy
s = sharepy.connect("company.sharepoint.com")
但他们都失败了,我得到403, Forbidden或401 Client Error: Unauthorized for url。
谁能帮忙看看这里可能是什么问题?
提前致谢!
C.
【问题讨论】:
标签: python sharepoint sharepoint-rest-api