1

How can I authenticate SharePoint users programmatically from a computer which is not a member of the domain where SharePoint server exists? SharePoint uses Windows auth only, not forms auth.

1
  • can you give us a bigger picture of the problem ? what are you trying to achieve ?
    – Steve B
    Commented Mar 21, 2012 at 8:31

2 Answers 2

1

If the non-domain computer is Windows running IE, they will retrieve a prompt for authentication, and they enter their credentials :

Domain\username Password

The "passthrough" or integrated auth won't work since they are not previously authenticated to domain, but once they enter their credentials as shown above it should work fine.

(not sure this answers the "programmatically" part of your question, but if you supply domain\username in your program that is running on a non-domain computer, I would think it should work the same. Clarify the question a little if necessary).

1

If you're in C# coded environment, you could just use impersonation using Win32 to 'log the user in', and run whatever code you need impersonated within that code block.

The code to do this is rather straightforward, here's an example on a Microsoft KB article: http://support.microsoft.com/kb/306158

In a few projects I've done, I've wrapped the code above into a static class that inherits IDisposable. This lets the caller have a using statement, and everything inside the using statement is run as the impersonated user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.