Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
    
can you give us a bigger picture of the problem ? what are you trying to achieve ? –  Steve B Mar 21 '12 at 8:31
add comment

2 Answers 2

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).

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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