【问题标题】:403 Forbidden Error for Python-Suds contacting SharepointPython-Suds 联系 Sharepoint 时出现 403 禁止错误
【发布时间】:2011-10-01 03:12:01
【问题描述】:

我正在使用 Python 的 SUDs 库来访问 Sharepoint Web 服务。 我遵循了 Suds 网站上的标准文档。 这2天,无论我访问哪个服务,远程服务总是返回403 Forbidden。

我使用的是 Suds 0.4,因此它内置了对访问 Python NTLM 的支持。

如果有人对此有任何线索,请告诉我。

from suds import transport
from suds import client
from suds.transport.https import WindowsHttpAuthenticated

import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.DEBUG)


ntlm = WindowsHttpAuthenticated(username='USER_ID', password='PASS')
c_lists = client.Client(url='https://SHAREPOINT_URL/_vti_bin/Lists.asmx?WSDL', transport=ntlm)
#c_lists = client.Client(url='https://SHAREPOINT_URL/_vti_bin/spsearch.asmx?WSDL')

#print c_lists

listsCollection = c_lists.service.GetListCollection()

【问题讨论】:

    标签: python sharepoint suds


    【解决方案1】:

    您是否将用户名指定为DOMAIN\USER_ID,如examples for the python-ntlm 库中所示? (另见this answer)。

    【讨论】:

    • 昨晚晚些时候,我通过某人在网上发布的代码之一了解到了这一点。问题是我不知道我的 DOMAIN 是什么。它总是只是“域”还是有某种方法可以找出我的域是什么。我计划联系 Sharepoint 管理员以了解情况。我知道我不在管理员组中,但不确定我在哪个组中。
    猜你喜欢
    • 2016-01-12
    • 2013-07-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-19
    • 2015-01-09
    相关资源
    最近更新 更多