Skip to content
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

[Bug] Login problems points to no internet connection #4721

Open
marionoack opened this issue Apr 19, 2024 · 4 comments
Open

[Bug] Login problems points to no internet connection #4721

marionoack opened this issue Apr 19, 2024 · 4 comments

Comments

@marionoack
Copy link

Library version used

4.60.3

.NET version

4.8 x64

Scenario

PublicClient - desktop app

Is this a new or an existing app?

The app is in production, I haven't upgraded MSAL, but started seeing this issue

Issue description and reproduction steps

Sometimes I get in my application during requesting token (interactive with broker) an error like:

Error Code: 3400007680
Error Message: NoNetwork
WAM Error Message: An unknown Internet error has occurred.
Internal Error Code: 557973641
Possible cause: no Internet connection

The reason looks clear, but I see no internet connection issues. So I look at msal.log (level information) and I can located a difference to other application logins:

2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z - 4a468961-51dc-4d0b-a005-fd99e8a174e5] === Token Acquisition (InteractiveRequest) started:
Authority: https://login.microsoftonline.com/b616fb64-df7b-4844-80ff-xxxx/
Scope:
ClientId: 33b26c15-e517-4587-97c2-xxxx

2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z - 4a468961-51dc-4d0b-a005-fd99e8a174e5] [Instance Discovery] Instance discovery is enabled and will be performed
2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z - 4a468961-51dc-4d0b-a005-fd99e8a174e5] [Region discovery] Not using a regional authority.
2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z - 4a468961-51dc-4d0b-a005-fd99e8a174e5] Fetching instance discovery from the network from host login.microsoftonline.com. Endpoint https://login.microsoftonline.com/common/discovery/instance.
2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z - 4a468961-51dc-4d0b-a005-fd99e8a174e5] Authority validation enabled? True.
2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z - 4a468961-51dc-4d0b-a005-fd99e8a174e5] Authority validation - is known env? True.
2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z - 4a468961-51dc-4d0b-a005-fd99e8a174e5] Broker is configured. Starting broker flow without knowing the broker installation app link.
2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z] [Runtime] WAM supported OS.
2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z - 4a468961-51dc-4d0b-a005-fd99e8a174e5] Can invoke broker. Will attempt to acquire token with broker.
2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z] [RuntimeBroker] Calling SignInInteractivelyAsync this will show the account picker.
2024-04-19 14:52:30 - Warning - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z] [MSAL:0001] WARNING SetAuthorityString:98 Initializing authority from string 'https://login.microsoftonline.com/b616fb64-df7b-4844-80ff-xxxx/' without authority type, defaulting to MsSts
2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z] [MSAL:0002] INFO SetCorrelationId:273 Set correlation ID: 4a468961-51dc-4d0b-a005-fd99e8a174e5
2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z] [MSAL:0002] INFO ExecuteInteractiveRequest:1103 The original authority is 'https://login.microsoftonline.com/b616fb64-df7b-4844-80ff-xxxx'
2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z] [MSAL:0002] INFO ExecuteInteractiveRequest:1114 The normalized realm is ''
2024-04-19 14:52:30 - Warning - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z] [MSAL:0002] WARNING ProcessRequestedScopes:536 Disallowed scope detected. openid will be ignored as MSAL adds this to requests automatically.
2024-04-19 14:52:30 - Warning - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z] [MSAL:0002] WARNING ProcessRequestedScopes:536 Disallowed scope detected. profile will be ignored as MSAL adds this to requests automatically.
2024-04-19 14:52:30 - Warning - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z] [MSAL:0002] WARNING ProcessRequestedScopes:536 Disallowed scope detected. offline_access will be ignored as MSAL adds this to requests automatically.
2024-04-19 14:52:30 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z] [MSAL:0002] INFO ModifyAndValidateAuthParameters:215 Authority Realm: b616fb64-df7b-4844-80ff-xxxx
2024-04-19 14:52:30 - Warning - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:30Z] [MSAL:0003] WARNING ReadAccountById:227 Account id is empty - account not found
2024-04-19 14:52:43 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:43Z] [MSAL:0003] INFO LogTelemetryData:393 Printing Telemetry for Correlation ID: 4a468961-51dc-4d0b-a005-fd99e8a174e5
2024-04-19 14:52:43 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:43Z] [MSAL:0003] INFO LogTelemetryData:401 Key: start_time, Value: 2024-04-19T12:52:30.000Z
2024-04-19 14:52:43 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:43Z] [MSAL:0003] INFO LogTelemetryData:401 Key: api_name, Value: SignInInteractively
2024-04-19 14:52:43 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:43Z] [MSAL:0003] INFO LogTelemetryData:401 Key: was_request_throttled, Value: false
2024-04-19 14:52:43 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:43Z] [MSAL:0003] INFO LogTelemetryData:401 Key: authority_type, Value: AAD
2024-04-19 14:52:43 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:43Z] [MSAL:0003] INFO LogTelemetryData:401 Key: access_token_expiry_time, Value: 2024-04-19T14:06:48.000Z
2024-04-19 14:52:43 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:43Z] [MSAL:0003] INFO LogTelemetryData:401 Key: msal_version, Value: 1.1.0+local
2024-04-19 14:52:43 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:43Z] [MSAL:0003] INFO LogTelemetryData:401 Key: client_id, Value: 33b26c15-e517-4587-97c2-xxxx
2024-04-19 14:52:43 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:43Z] [MSAL:0003] INFO LogTelemetryData:401 Key: correlation_id, Value: 4a468961-51dc-4d0b-a005-fd99e8a174e5
2024-04-19 14:52:43 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:43Z] [MSAL:0003] INFO LogTelemetryData:401 Key: broker_app_used, Value: true
2024-04-19 14:52:43 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:43Z] [MSAL:0003] INFO LogTelemetryData:401 Key: stop_time, Value: 2024-04-19T12:52:43.000Z
2024-04-19 14:52:43 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:43Z] [MSAL:0003] INFO LogTelemetryData:401 Key: msalruntime_version, Value: 0.16.0
2024-04-19 14:52:43 - Info - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-04-19 12:52:43Z] [MSAL:0003] INFO LogTelemetryData:401 Key: original_authority, Value: https://login.microsoftonline.com/b616fb64-df7b-4844-80ff-xxxx

The difference to successful logins are additional logs like:

Disallowed scope detected. openid will be ignored as MSAL adds this to requests automatically.

I have no idea. I don't request any scope.

Relevant code snippets

No response

Expected behavior

Successful login and fullfilment of token request.

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

Try the same a second time will works fine in most cases.

@marionoack marionoack added needs attention Delete label after triage untriaged Do not delete. Needed for Automation labels Apr 19, 2024
@trwalke trwalke added public-client WAM and removed untriaged Do not delete. Needed for Automation needs attention Delete label after triage labels Apr 23, 2024
@trwalke
Copy link
Member

trwalke commented Apr 23, 2024

If MSAL is not updated and this started happening suddenly, it usually points to an Entra Id service endpoint issue.
@ashok672 have you seen this in WAM before?

@bgavrilMS
Copy link
Member

Thanks @trwalke . If in doubt, mark it as bug please...

@localden
Copy link
Collaborator

@marionoack - can you please verify whether this is still happening?

@marionoack
Copy link
Author

@localden Yes, last friday on my computer and another colleague on other location (different provider, during Teams call => connection available):

2024-05-17 12:12:17 - Error - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-05-17 10:12:17Z] [RuntimeBroker] WAM_network_error_3400007680 WAM Error
Error Code: 3400007680
Error Message: NoNetwork
WAM Error Message: An unknown Internet error has occurred.
Internal Error Code: 557973641
Possible cause: no Internet connection
2024-05-17 12:12:17 - Error - True MSAL 4.60.3.0 MSAL.Desktop 4.8 or later Windows 10 Pro [2024-05-17 10:12:17Z - 6855d0a6-ae4b-44a9-a027-5d314c5a51d6] MSAL.Desktop.4.60.3.0.MsalServiceException:
ErrorCode: 3400007680
Microsoft.Identity.Client.MsalServiceException: WAM Error
Error Code: 3400007680
Error Message: NoNetwork
WAM Error Message: An unknown Internet error has occurred.
Internal Error Code: 557973641
Possible cause: no Internet connection
bei Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.WamAdapters.HandleResponse(AuthResult authResult, AuthenticationRequestParameters authenticationRequestParameters, ILoggerAdapter logger, String errorMessage)
bei Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.RuntimeBroker.d__13.MoveNext()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants