-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# code works, but not its Node equivalent: 401 Unauthorized #419
Comments
Investigating further on the 'CreateItem' request sent, I could find some differences in the headers:
Any clue to make my Node app work? |
Am I the only one have this issue? If anyone has any clue, even if it's not a solution, I would greatly appreciate any feedback: it might help me to find what to look after, to fix it. |
Same problem here, but no solution yet... |
Thanks Cimchd, I feel less alone. |
Have you tried to find out if you need NTLM auth or basic auth? Check with your exchange admin. This library does not have built in Windows NTLM auth you have to use it separately |
Thank you Gautamsi, the C# code above works. Could it work if NTLM is required? |
yes, c# runs on windows and it can choose between NTLM or not, but you have to know beforehand with this lib and use https://github.com/ewsjs/xhr to setup NTLM. |
Thank you so much, will give a try (I have zero skills on ntlm, hope I won't be stuck due to this) |
Great news, thanks to the xhr package I could make it work, thank you again! Now, I would like to use the autodiscover, but it does not work:
When I run this, I get: autod error undefined I have tried some variants, but no luck. Do you know what is wrong here? |
Softly asking again in case my last question was skipped :) Many thanks again for the help provided already! |
Autodiscover may not work with NTLM, in case you are using NTLM you can provide direct URL to ews. in this example, you have already provided url so it is not going to autodiscover anything |
Thank you very much Gautamsi! Do you refer to the code example I gave on February 3rd? The only URL it provides is one for autodiscovery ( Regarding NTLM, autodiscovery works with the C# code I have provided on January 2nd, so I suspect the reason of failure is not NTLM, do you agree? Or do you mean that the autodiscover implementation of the ews-javascript-api node package does not work with NTLM? One more hint: I have tried with a 3rd party tool (Calendly) that by giving only the email address and the password, it was able to connect to that specific account, so the autodiscovery has worked in that case too. Many thanks in advance for any further help! I would love so much to offer autodiscovery in my app :) |
I no longer have access to NTLM exchange server to test this :( |
Hi @gautamsi, I'm experiencing the same issue as @bfredo123.
I've setup a test Exchange server following these instructions. Is there anything that the instructions are missing to enable NTLM? |
That should do it, let me know how can I access this. you can connect with me on linkedin (link in profile) to send message with credential. |
thanks @joeauyeung for the server access, I have updated version to alternative solution was to use |
Hi,
I am trying to use this ews-javascript-api package, but I am facing an issue:
The server is a hosted Exchange one, and as it works from the Windows client, I assume the issue is not caused by the server rejecting basic auth.
Could you please help me?
Below are the 2 codes (working C#, and failing Node).
BTW: the autodiscovery fails on Node if I specify the 2007_SP1 exchange version, whereas it works on C#. When I switch to 2010 or above, then it works. Do you know why?
BTW2: the traces do not output anything in Node (but it seams to be implemented, so maybe I miss something to make it work?)
Many thanks!
C# working code:
Node failing code:
Here is the exception I get:
The text was updated successfully, but these errors were encountered: