network_error - Azure AD MSAL Node.JS

Mr. Genesis 1 Reputation point

I am trying auth using Node.JS, but when the app send the validation data throw an error and I not found what I am doing wrog.


Text of message:
errorMessage: 'Network request failed. Please check network trace to determine root cause. | Fetch client threw: Error: Error: read ECONNRESET | Attempted to reach:'

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,829 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Cristian SPIRIDON 4,471 Reputation points


    The error says that you can't reach that url.

    Do you have basic internet connectivity from that machine?
    Do you have any firewall rules that prevents you from reaching

    Hope this helps!

    0 comments No comments

  2. 2022-10-03T21:35:10.17+00:00

    Hello @Mr. Genesis and thanks for reaching out. You code looks good. ECONNRESET means the other side of the TCP conversation abruptly closed its end of the connection. Since you're able to reach the /authorize endpoint and as @Cristian SPIRIDON suggests, you may have a (web) firewall or proxy blocking POST requests.

    Try running the code from a device in a network without proxy or firewall, it should work. Please reach your networking team to ensure POST requests to the /token endpoint are not being blocked or come back to us for additional debugging instructions.

    Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.