How to authenticate against a Microsoft SharePoint server using NTLM/Indy 10?

Giganews Newsgroups
Subject: How to authenticate against a Microsoft SharePoint server using NTLM/Indy 10?
Posted by:  Rasmus Møller Selsmark (r…@codegroup.dk)
Date: Wed, 27 Jan 2010

Hi,

We have a software product that is able to store files in Microsoft
SharePoint using Windows authentication (i.e. the user doesn't have to
specify username/password in order to upload files to SharePoint)

We've recently upgraded to Delphi 2010/Indy 10, which has caused us som
problems.

In short our old Delphi 2007/Indy 9 solution (which worked) used the
following Indy 9 features:

- IdAuthenticationSSPI
- Set HTTPOptions := .. + [hoInProcessAuth] (for our TIdHTTP instance)
- Called Get() and Post() methods on TIdHttp

After upgrading to Delphi 2010/Indy 10, we have experienced the following:

- IdAuthenticationSSPI isn't included in the official Delphi 2010 release,
and from e.g. https://forums.codegear.com/thread.jspa?threadID=19765 it
seems that IdAuthenticationNTLM is the "supported" method in Indy 10. And
SharePoint does return "Proxy-Authenticate: NTLM", so NTLM should be fine
- We have upgraded to latest version of the Tiburon branch

But we cannot get the Windows authentication to work. If we set username and
password manually on the TIdHttp object, it works, but we would of course
like to use integrated Windows authentication, so the user doesn't have to
provide credentials.

Any help on how to get the Windows authentication to work with Indy 10 is
highly appreciated.

Best regards,

Rasmus Møller Selsmark

Replies