Share via

"Get subscriptions for a user" API not working

Ashutosh Tripathy 6 Reputation points
2021-12-14T06:44:14.653+00:00

Hi Team,

  1. We have an app in Windows store with subscription model.
  2. We are able to generate azure AD token and b2bkey(Microsoft storeid) is with us.
  3. After an active subscription when we are trying to get the subscription for a user, getting below error,
    https://purchase.mp.microsoft.com/v8.0/b2b/recurrences/query

{
"code": "Unauthorized",
"data": [],
"details": [],
"innererror": {
"code": "AuthenticationTokenInvalid",
"data": [
"SecurityTokenInvalidAudienceException"
],
"details": [],
"message": "Authentication token supplied is invalid"
},
"message": "The client is not authorized to perform the requested operation.",
"source": "PurchaseFD"
}

We have followed all the steps mentioned in below documentation, but still not able to get the above store API to work.
https://learn.microsoft.com/en-us/windows/uwp/monetize/get-subscriptions-for-a-user

The same authorization token works for "query for products"(https://collections.mp.microsoft.com/v6.0/collections/query).
Let us know if we need to generate the token differently for "Get subscription for a user".

Any help or guidance on this is appreciated.

Regards,
Ashutosh

Microsoft Partner Center | Other

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.