Skip to content

The Microsoft Store source is added even if the Microsoft Store isn't available. #1558

Description

Brief description of your issue

If you're on a version of Windows that doesn't have the Microsoft Store (LTSC, Server, the weird build Sandbox runs), winget adds the Microsoft Store source even though you can't use it since you can't sign in.

Steps to reproduce

  1. Install winget on Windows Sandbox (or real LTSC).
  2. Run winget install solitaire.
  3. Note that it doesn't work since you aren't signed in.
  4. Try to go sign in, and remember that you don't have the Microsoft Store so you can't do that.

Expected behavior

Either the Microsoft Store source won't be added at all so the searches make more sense, or it will do the install without auth (as that's the same behavior that the Microsoft Store app has for free apps).

Actual behavior

image

Environment

[winget --info]

Windows: Windows.Desktop v10.0.22000.194
Package: Microsoft.DesktopAppInstaller v1.16.12653.0

Any other software?

Activity

  1. ghost added
    Needs-TriageIssue needs to be triaged
    on Oct 7, 2021
  2. added
    Issue-FeatureThis is a feature request for the Windows Package Manager client.
    msstoreIssue related to "msstore" REST source
    and removed
    Needs-TriageIssue needs to be triaged
    on Oct 7, 2021
  3. added this to the milestone on Oct 7, 2021
  4. KevinLaMS commented on Oct 7, 2021

    @KevinLaMS
    Contributor

    Thanks for the report. I believe this is related to the user not being logged on to the store. Can you log into the store and retry? I suspect this will address the issue.

  5. jedieaston commented on Oct 7, 2021

    @jedieaston
    ContributorAuthor

    I can't log into the store because the store isn't installed on LTSC builds (or on Server, or in the Sandbox)1. Therefore, I think the expected behavior here would be that the msstore source isn't available on systems that don't have the Microsoft Store installed.

    Footnotes

    1. explanation here, specifically "Features from Windows 10 that could be updated with new functionality, including Cortana, Edge, and all in-box Universal Windows apps, are also not included.". I can still install winget manually (or use the in-box App Installer eventually), but in that case the Microsoft Store still isn't available. ↩

  6. denelon commented on Oct 7, 2021

    @denelon
    Collaborator

    It looks like we might need to expand on the scenario for purchased apps. We may need to add some kind of authentication method for the Windows Package Manager if/when the Microsoft Store isn't present.

  7. KevinLaMS commented on Oct 7, 2021

    @KevinLaMS
    Contributor

    Easton Pillay (@jedieaston) I need a head slap emoji. :) Thanks for clarifying.

  8. JohnMcPMS commented on Oct 7, 2021

    @JohnMcPMS
    Member

    Due to architectural reasons, the msstore source is a combination of different catalogs internally. So there are some packages that will be able to install in your scenarios. I think the right answer is not to remove the source completely, but rather detect it and limit the available packages.

    Even better if we can get anonymous installs to work where appropriate, but there may be legal hurdles there that we are not aware of. Additionally, I'm not sure if the OS components are even present in these cases.

  9. modified the milestones: , v1.3-Client on Dec 1, 2021
  10. denelon commented on Dec 3, 2021

    @denelon
    Collaborator

    We're working on enabling the anonymous scenario. Most free packages rated "e" for everyone should not require MSA authentication in the Microsoft Store source.

  11. denelon commented on May 31, 2022

    @denelon
    Collaborator

    Easton Pillay (@jedieaston)

    Does this Issue look like it's resolved in your opinion? Since the bug has been fixed for anonymous install this might be resolved. Let me know what you think.

  12. jedieaston commented on May 31, 2022

    @jedieaston
    ContributorAuthor

    The issue was that the Microsoft Store source exists even if the Microsoft Store itself isn't installed, and therefore some apps can't be installed (regardless of authentication being necessary). In Windows Sandbox, where the Microsoft Store isn't available, the store source is still installed by default in the latest preview but doesn't work correctly since there isn't a store:

    PS C:\Users\WDAGUtilityAccount\Desktop\Dev> winget install iTunes --source msstore
    The `msstore` source requires that you view the following agreements before using.
    Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
    The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").
    
    Do you agree to all the source agreements terms?
    [Y] Yes  [N] No: y
    Found iTunes [9PB2MZ1ZMB1S] Version Unknown
    # snip the long description
    The publisher requires that you view the above information and accept the agreements before installing.
    Do you agree to the terms?
    [Y] Yes  [N] No: y
    Verifying/Requesting package acquisition...
    Verifying/Requesting package acquisition success
    Starting package install...
    Failed to install or update Microsoft Store package. Error code: 0x80070422
    PS C:\Users\WDAGUtilityAccount\Desktop\Dev> winget install -s msstore "Visual Studio Code" # a Win32 app from the Microsoft Store
    Found Visual Studio Code [XP9KHM4BK9FZ7Q] Version Unknown
    # snip the long description
    The publisher requires that you view the above information and accept the agreements before installing.
    Do you agree to the terms?
    [Y] Yes  [N] No: y
    Downloading https://github.com/microsoft/vscode-winsta11er/releases/download/v0.0.5/vscode-winsta11er-x64.exe
      ██████████████████████████████  6.34 MB / 6.34 MB
    Successfully verified installer hash
    Starting package install...
    Successfully installed
    

    JohnMcPMS is right, there are packages that will install (Win32 apps, specifically, since they act like other winget apps). I think that winget should be able to detect which apps are installable and hide the others from searches to prevent confusion. It's up to you if that's a different bug or not, since strictly speaking, the Microsoft Store source works a bit more than it did (it's still confusing though).

  13. denelon commented on May 31, 2022

    @denelon
    Collaborator

    OK, I'll keep this open, and start some internal discussions on what kind of options might get the right desired behavior.

  14. modified the milestones: v1.4-Client, on Jan 5, 2023
  15. removed this from the milestone on Nov 14, 2024
  16. denelon commented on Oct 9, 2025

    @denelon
    Collaborator

    I've got a bit of an update here.

    The Windows Sandbox doesn't support the Windows Update service which contains part of the code necessary to install packages from the Microsoft Store (even when the Microsoft Store client isn't installed). There is no requirement to be logged into the Microsoft Store to install the packages from the Microsoft Store.

    The other situation where this can be a point of failure is when the Microsoft Store licensing server cannot be reached by the device, so the license ends up failing.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-FeatureThis is a feature request for the Windows Package Manager client.msstoreIssue related to "msstore" REST source

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions