How to disable Microsoft Edge automatic sign-in on first run?

milolav‪ 6 Reputation points
2021-05-03T21:35:24.803+00:00

When you are signed into windows with Microsoft account, starting Microsoft Edge automatically signs you in.
<email> has signed in on this device, so we've also signed you in to Microsoft Edge.
How to disable this behaviour?

Among other things, I don't want debugger profile from VSCode to automatically sign me in, but I do want to have main profile signed in. Since debugger profile created in temp dir, it gets deleted when cleaning temp dir, signing me again on the next run. For example, browser started in debug session shows the following command line:
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --remote-debugging-port=2015 --no-first-run --no-default-browser-check --user-data-dir="C:\Users\user\AppData\Local\Temp\vscode-edge-debug-userdatadir_2015" --flag-switches-begin --flag-switches-end

As per Edge policy, https://learn.microsoft.com/en-us/deployedge/microsoft-edge-policies#browsersignin if I disable sign in, I won't be able to use it on my main profile.

So, how to run msedge.exe without automatic sign-in? Is there a switch, a policy or something that will disable it? Can it be disabled by default when --user-data-dir switch is present?

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,123 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Minh Ngọc Phan 6 Reputation points
    2021-09-28T13:32:31.453+00:00

    Try going to Settings/Profiles
    / Profile preferences/Allow single sign-on for work or school sites using this profile and disable that setting.
    I hope it helps.

    135894-image.png

    1 person found this answer helpful.
    0 comments No comments

  2. Anas Asimi 5 Reputation points
    2023-07-29T20:55:40.4966667+00:00

    You can open browser in guest mode by using --guest flag

    thats will solve the probleme

    1 person found this answer helpful.

  3. Yu Zhou-MSFT 12,041 Reputation points Microsoft Vendor
    2021-05-05T09:55:09.293+00:00

    Hi @milolav‪

    You don't have that option maybe because the Microsoft account is the main account you use to sign in the computer and the main account will allow all apps to sign in. Only if you can set that option then you can avoid Edge automatically signing in with Microsoft account.

    As far as I know, there's no option to disable only Edge from automatically signing with Microsoft account. I also click the Manage button of the account to see if there's any settings, but I find no. Besides, in the description of HideFirstRunExperience policy, it says:

    The user will still be automatically signed into Microsoft Edge if the Windows account is of Azure AD or MSA type.

    So I think it's by design that Edge will automatically signing with Microsoft account if you log in Windows with Microsoft account.

    About pining Edge to taskbar, that's the default behavior of Edge browser. Even if Edge doesn't automatically sign you in, it will also pin itself to taskbar. If you don't like the feature of Edge or have some suggestions about Edge, I suggest you can provide your feedback using Alt+Shift+I in Edge.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Regards,
    Yu Zhou


  4. milolav‪ 6 Reputation points
    2021-05-07T16:41:16.22+00:00

    Hi @Yu Zhou-MSFT

    Only if you can set that option then you can avoid Edge automatically signing in with Microsoft account.

    How to do that? Can you provide a registry key, settings location or something that will allow me to set this value even though I don't see it in settings? Or configuration how to get this option visible in settings?

    I don't think automatic sign-in and pinning items to user's taskbar without approval is appropriate "default" behaviour. Is there any planned changes to fix that?

    Funny enough, latest edge version, 90.0.818.51, breaks relative --user-data-dir folders. This worked in previous versions:
    %ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe --no-default-browser-check --no-first-run --enable-extensions --bookmark-menu --user-data-dir="TestProfile1"

    While now it throws an error
    94845-ss1.png

    Setting --user-data-dir="C:\Testing\TestProfile1" works fine

    0 comments No comments

  5. Dgo Swiss 0 Reputation points
    2023-05-06T20:49:39.04+00:00

    I was having a similar issue where it was automatically logging in - attempting to anyway - to my work account, which requires MFA through a pop-up that would incessantly come back up after closing. So, if it helps, I was able to simply open another Edge window and click sign-out and that prevented the auto-login to my work account; I don't have the issue with the unclosable pop-up window anymore. Lastly, I was also able to follow Minh Ngọc Phan's steps to prevent Edge from auto signing into my personal account!

    0 comments No comments