Share via

GetCustomerCollectionsIdAsync returns an empty string

vexakul 1 Reputation point
2022-01-27T20:16:33.883+00:00

Well, I'm trying to get user token with StoreContext.GetCustomerCollectionsIdAsync to pass to my service. I'm passing in the collections api token I get in my service and the string "user" as the second arg (just some non-empty string). I've associated client ID with the app. I'm running out of ideas how to fix this. There is no any debug info available, just an empty string.

Microsoft Partner Center | Other

1 answer

Sort by: Most helpful
  1. vexakul 1 Reputation point
    2022-02-15T21:42:50.487+00:00

    Well after some time debugging this a valid thought had finally come to my mind, which was "may be the code I blindly trust is wrong?". And the answer was "yes". I relied on code from Microsoft-Store-Services sample. I removed v2.0 at https://github.com/microsoft/Microsoft-Store-Services/blob/main/Microsoft.StoreServices/Microsoft.StoreServices/Authentication/AccessTokenProvider.cs#L110 and changed 'scope' to 'resource' also removing './default' after audience and it worked.

    Was this answer helpful?

    0 comments No comments

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.