Azure-Samples / Azure-Samples/active-directory-dotnet-native-aspnetcore-v2

Script Error when clicking the link Sign out and sign in with a different account

Open
#182 7 comments 0 reactions 0 assignees View on GitHub
external service-side-issue
Dominant language
C#
Stars
290
Forks
194
PR merge metrics
No merged PRs in 30d

Description

> Please provide us with the following information:
> ---------------------------------------------------------------

### This issue is for a: (mark with an `x`)
```
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

### Minimal steps to reproduce
>
I am using the un-modified Desktop-App-calls-Web-API" TodoListClient and TodoListService" sample configured in my Azure AD tenant per the instructions on github.

I reproduced this both with the Microsoft.Identity.Web v1.4.0 nuget package, which is the one the source code un-modified uses as well as the latest version v1.4.1 of the Microsoft.Identity.Web nuget package

I am using the "Azure AD Free" SKU of Azure AD, however I have also reproduced this using the P2 SKU of Azure AD

1. Sign in with a valid account in your tenant
2. Click the "Clear Cache" button
3. Click the "Sign in" button

4. Enter the email address of another valid Microsoft account. By Microsoft account I mean an account created using https://account.microsoft.com/account

Note: This account does not have to be in your tenant but if it is in your tenant the account must be added as a Guest account in Azure AD.

5. Click "Next"
6. Click the "Sign out and sign in with a different account." link
7. Observe the "Script Error" Dialog with the following information
An error has occurred in the script on this page.
Line: 202
Char: 337
Error: Object doesn't support property or method attachEvent'
Code: 0
URL: https://login.microsoftonline.com/login.srf?
wa=wsignoutcleanup1.0&sid=M.10653612753695256942&iss=h ttps://login.live.com
Do you want to continue running scripts on this page?

### Any log messages given by the failure
>
No

### Expected/desired behavior
>
The "Sign in to your Microsoft account" user interface presents the "Enter Password" screen and you are able to login, assuming the account is a valid account in your tenant. If the account is not a valid account in your tenant then the standard error message should appear.

### OS and Version?
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Windows 10

### Versions
>
Version 20H2 (OS Build 19042.685)

### Mention any other details that might be useful
This not only happens with the sample code but with custom applications I have built that utilize the MSAL.

If you click the "No" or "Yes" button on the JavaScript error page, typically 2-3 times, the "Sign in to your Microsoft account" screen is presented.

> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.