question

JeffC-7943 avatar image
0 Votes"
JeffC-7943 asked JeffC-7943 commented

Microsoft Store Web API Query For Products Always Returns Empty List

I have an app in the store.

The app has a Developer-Managed Consumable Add-on.

I'm attempting to consume the add-on from an ASP.Net Core / Azure App Service.

I have successfully configured the keys required and associated the Azure AD Client ID in Microsoft Partner Center.

I have successfully created Azure AD access tokens, one for the Bearer header with https://onestore.microsoft.com audience, and the second for https://onestore.microsoft.com/b2b/keys/create/collections, which is sent to the client, which successfully calls GetCustomerCollectionsIdAsync on the store context. This returns the resulting Store ID to the service, which attempts to list products for the user.

That request succeeds (200), but the returned list is always empty. I've tried all the different types, and none of them returns anything. My application can call GetConsumableBalanceRemainingAsync, which returns a BalanceRemaining of 1, as expected.

I'm quite baffled at this point. I've tried quite a few things to get this to work, various filters - specifying the Store ID / Sku ID, etc. etc. Nothing seems to work.

Am I missing something with the add-on type? The terminology in Partner center calls my add-on a Consumable (Developer-Managed), while the service API has type "UnmanagedConsumable". In any case, I can't even query for the application itself.

Thanks

partner-center-general
· 11
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JeffC-7943 Could you please tell me which uri you used to get the tokens?

0 Votes 0 ·

As much as I've tried to reply to this, the Submit button is not working. I hope my tagged comment works.

0 Votes 0 ·

Did you have further information regarding the uri I used to get the tokens:


https://login.microsoftonline.com/<tenant id>/oath2/token - where I have replaced <tenant id> with my azure ad tenant id (as described here https://docs.microsoft.com/en-us/windows/uwp/monetize/view-and-grant-products-from-a-service).

I noticed the documentation here (https://docs.microsoft.com/en-us/azure/active-directory/azuread-dev/v1-oauth2-client-creds-grant-flow#register-the-services-in-azure-ad) suggest new apps use MIP - I'm not sure I see a practical difference.
Thanks!

0 Votes 0 ·

@AryaDing-MSFT - thanks for your reply

https://login.microsoftonline.com/<tenant id>/oath2/token - where I have replaced <tenant id> with my azure ad tenant id (as described here https://docs.microsoft.com/en-us/windows/uwp/monetize/view-and-grant-products-from-a-service).

I noticed the documentation here (https://docs.microsoft.com/en-us/azure/active-directory/azuread-dev/v1-oauth2-client-creds-grant-flow#register-the-services-in-azure-ad) suggest new apps use MIP - I'm not sure I see a practical difference.
Thanks!

0 Votes 0 ·

What kind of action do you want to do? If you want to purchase an add-on, please check this: Enable in-app purchases of apps and add-ons.
If you want to get all the info of the add-ons, please check this: Get product info for apps and add-ons.
Since your add-on is a Developer-managed consumable add-on, you have to manage the user's balance on your own. If you want to manage your consumable add-on, please check this: Enable consumable add-on purchases.


0 Votes 0 ·

RoyLi-MSFT, the documentation you linked has very little to do with what I'm trying to do.

I'm trying to mark a developer-managed consumable add-on as fulfilled from a service -- that is, on a server.
Like this,
https://docs.microsoft.com/en-us/windows/uwp/monetize/view-and-grant-products-from-a-service
more specifically, this step:
https://docs.microsoft.com/en-us/windows/uwp/monetize/query-for-products
But as I can't get the query for products working, I can't mark them as fulfilled like this:
https://docs.microsoft.com/en-us/windows/uwp/monetize/report-consumable-products-as-fulfilled






0 Votes 0 ·

Please open a free support ticket here: Contact Us. Choose to Contact us, select Dashboard for Topic, and select App submissions and management for issue type.

0 Votes 0 ·
Show more comments

My latest result is that the API is now UNRELIABLE. Sometimes it returns an empty list, and sometimes it returns a correctly populated list. I haven't changed anything in my code that I think could affect this, other than maybe it could be some sort of timing issue?

0 Votes 0 ·

Have you opened the free support ticket? If you have, please keep in contact with the engineer and share your issues.

0 Votes 0 ·

Yes I did - at first they said I should post here, but then I sent them source code. I'm hoping for progress.

0 Votes 0 ·

0 Answers