我希望连接到我的公司sharepoint列表,但出于测试目的,我使用我创建的这个虚拟模板
from shareplum import Site
from requests_ntlm import HttpNtlmAuth
cred = HttpNtlmAuth('email I use to login', 'password')
site = Site('https://griffithcollege628.sharepoint.com/sites/Sharepointtest/', auth=cred)
sp_list = site.List('list name')
list_data = sp_list.GetListItems()
但当我说到这一行时:
site = Site('https://griffithcollege628.sharepoint.com/sites/Sharepointtest/', auth=cred)
我得到以下错误:
Shareplum HTTP Post Failed : 403 Client Error: Forbidden for url: https://griffithcollege628.sharepoint.com/sites/Sharepointtest//_vti_bin/lists.asmx
请检查您用于连接的用户ID是否已添加到SharePoint网站
在
_vti_bin
之前应该只有一个/
。尝试从站点变量中删除尾随的/
我不使用python,所以我不知道这种身份验证是否有效,但我对SharePoint的了解足以证明带有双
//
的URL是无效的我已经尝试了下面的方法,我能够得到列表项。 让我知道它是否有效
相关问题 更多 >
编程相关推荐