microsoft / msstore-cli

Microsoft Store CLI
MIT License
83 stars 9 forks source link

Error signing in, "could not find organization" #4

Closed marcelwgn closed 1 year ago

marcelwgn commented 1 year ago

I'm using a personal account that is part of an Azure Directory which has access to the Windows App Developer Portal. While the documentation says not to use an MSA, I'm surprised that using another personal account doesn't seem to work giving the error "please use a work account". Am I doing something wrong here or is the behavior expected?

azchohfi commented 1 year ago

What exact error do you get? From my early testing, this is expected. Still, it might be possible to add this support (for MSAs that are added as guest users to the tenant), but more investigation is needed.

marcelwgn commented 1 year ago

The error I'm getting is "Error while retrieving organization" and yes the account was added as guest to the tenant. If there's any way I can help debug this further I would be more than happy to try that out.

So the current "workaround" would be to create an "pure" AAD user in that tenant and use that then?

azchohfi commented 1 year ago

Yes, that is correct. You can either do that or generate the AAD App inside at Partner Center, like you would for a CI/CD scenario: https://learn.microsoft.com/windows/apps/publish/msstore-dev-cli/ci-cd-environments

Then you can locally call: msstore reconfigure --tenantId PARTNER_CENTER_TENANT_ID --sellerId PARTNER_CENTER_SELLER_ID --clientId PARTNER_CENTER_CLIENT_ID --clientSecret PARTNER_CENTER_CLIENT_SECRET After these, you should be good to go.

You need to get these values from Partner Center, and you can create them following these steps: https://learn.microsoft.com/windows/apps/publish/partner-center/manage-azure-ad-applications-in-partner-center#create-a-new-azure-ad-application-account-in-your-organizations-directory-and-add-it-to-your-partner-center-account

marcelwgn commented 1 year ago

Alright, thanks!