node-asclient icon indicating copy to clipboard operation
node-asclient copied to clipboard

AD endpoint URI

Open ktk opened this issue 10 years ago • 6 comments

First, thanks a lot for the code, I'm looking for something like this for a long time!

I try to figure out how to connect to an AD server. I don't know much about AD and so far all I had to provide was [email protected] and systems like MacOS know how to connect to it. I have a Exchange web interface at https://myexchange.mydomain.com so I created https://myexchange.mydomain.com/Microsoft-Server-ActiveSync but that didn't seem to work. A CURL on that URI returns a 401 with Unauthorized so at least it seems to resolve something.

If I connect with the sample code all I see is Error: The server didnt respond properly.

Can you give some more hints about what I could try to get the sample working?

ktk avatar Dec 11 '15 15:12 ktk

It is assumed that the Exchange server supports NTLM authentication. Not sure how your server is configured. Could you do a curl again and let me know the value of the www-authenticate header

clncln1 avatar Dec 14 '15 08:12 clncln1

Thanks for the feedback, I get:

WWW-Authenticate: Basic realm="myexchange.mydomain.com"

ktk avatar Dec 14 '15 12:12 ktk

Checked some postings at Stackoverflow, see https://stackoverflow.com/questions/4265975/authentication-issues-with-www-authenticate-negotiate. It seems that this server really simply assumes basic auth from what I can see. Would you agree with this?

If so I could try to hack basic auth into it instead of NTLM auth.

ktk avatar Dec 14 '15 14:12 ktk

I tried doing basic auth via curl, does not work out with my domain user. So not sure if this is gonna work that way. What I didn't mention yet is that this is a stone old Exchange server, IIRC 2003. So might well be the problem as well.

ktk avatar Dec 15 '15 10:12 ktk

Yeah, I could definitely add a fallback to Basic Auth, but if you don't get it to work via curl, I am afraid it seems to be a server config issue then.

clncln1 avatar Dec 15 '15 10:12 clncln1

Added Basic auth fallback in clncln1/node-ntlm-client@654860a Version bumped to 0.1.0 due to behavior change.

This is an alternative - imho cleaner - change to #2

clncln1 avatar Apr 24 '16 17:04 clncln1