Hi,
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 login.microsoftonline.com?
Hope this helps!
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello!
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: https://login.microsoftonline.com/2bd70d8a-6f4e-4cc1-aa00-469ce9c54770/oauth2/v2.0/token'
Hi,
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 login.microsoftonline.com?
Hope this helps!
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.
Hi. I have similar issue. Can someone help with this?
Error getting token: AuthenticationRequiredError: network_error: Network request failed
at handleMsalError (C:\node_modules\@azure\identity\dist\index.js:1564:12)
at withSilentAuthentication (C:\node_modules\@azure\identity\dist\index.js:2046:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.withSpan (C:\node_modules\@azure\core-tracing\dist\commonjs\tracingClient.js:36:28)
at async CustomAuthenticationProvider.authProvider [as provider] (file:///C:/EmailDynamic.js:95:29) {
scopes: [ 'https://graph.microsoft.com/.default' ],
getTokenOptions: {
tracingOptions: { tracingContext: [TracingContextImpl] },
tenantId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
}
}
Error sending mail: AuthenticationRequiredError: network_error: Network request failed
at handleMsalError
statusCode: -1,
code: 'AuthenticationRequiredError',
requestId: null,
date: 2024-06-06T15:51:16.123Z,
body: 'AuthenticationRequiredError: network_error: Network request failed',
headers: undefined
}