1

I'm using Python's SUDs lib to access Sharepoint web services. I followed the standard doc from Suds's website. For the past 2 days, no matter which service I access, the remote service always returns 403 Forbidden.

I'm using Suds 0.4 so it has built-in support for accessing Python NTLM.

Let me know if anyone has a clue about this.

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()
ttback
  • 2,051
  • 5
  • 27
  • 40

1 Answers1

1

Are you specifying the username as DOMAIN\USER_ID as indicated in examples for the python-ntlm library? (Also see this answer).

Community
  • 1
  • 1
ig0774
  • 39,669
  • 3
  • 55
  • 57
  • I learned about it later last night at one of the codes someone posted on the web. Problem was that I don't know what my DOMAIN is. Is it always just "DOMAIN" or is there some way I can find out what my domain is. I plan to contact the Sharepoint admin to find out. I know i'm not in the Admin group, but not sure which one I'm in. – ttback Oct 01 '11 at 13:18