GithubHelp home page GithubHelp logo

[Bug] System.Net.Http.HttpRequestException was thrown intermittently when acquire token about microsoft-authentication-library-for-dotnet HOT 4 OPEN

qinl-li avatar qinl-li commented on August 22, 2024
[Bug] System.Net.Http.HttpRequestException was thrown intermittently when acquire token

from microsoft-authentication-library-for-dotnet.

Comments (4)

bgavrilMS avatar bgavrilMS commented on August 22, 2024

The error does come from MSAL's HttpClient request to the STS, but the strack trace is not sufficient to understand what is happening. It could be an error from the server (400 or 401 response) which MSAL transforms in MsalServiceException, a timeout, bad HTTP call (maybe the region string is bad?).

Next steps:

  • Can you try to isolate the exception message ?
  • It would also help to have some basic logs from the affected machines.
  • Does the issue happen only in 1 region?

from microsoft-authentication-library-for-dotnet.

qinl-li avatar qinl-li commented on August 22, 2024

Unfortunately, we don't have any isolated exception to investigate. (We will add more telemetry around it)
The callback was captured from OS events during process crashes. It did happen across 21 regions according to our logs.
Since the ests-r has been turned off, now, we are flagged in s360. Any guidance for next step? Thanks!

from microsoft-authentication-library-for-dotnet.

bgavrilMS avatar bgavrilMS commented on August 22, 2024

Guidance would be to add logging and some monitoring as well, and run in pre-prod env or in a low traffic env to identify the root cause.

How is it failing in the 21 regions? All 100% of calls fail? This would indicate that the region strings are wrong. See here for region list.

Also, regional auth is fully tied to sending certificate chain. Not sure why it's an option in your code, but that flag should always be true.

from microsoft-authentication-library-for-dotnet.

qinl-li avatar qinl-li commented on August 22, 2024

The issue did happen across regions. But it doesn't seem to be 100% fail but an intermittent issue. I am working on adding the logs and monitoring and will let you know once I have more details.

Regarding the option of sending certificate chain, I believe we can safely remove it since it was enabled by default

from microsoft-authentication-library-for-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.