I'm trying to learn how to retrieve the Microsoft Store ID key. For this, I followed the examples provided by Microsoft in Windows Universal Samples. I tried to use the Business to Business scenario (scenario 7). I already published a sample App and registered the app in Azure Active Directory. The problem is I don't know what value should I send as the publisherUserId parameter in the getCustomerCollectionsIdAsync/getCustomerPurchaseIdAsync functions. I tried to send the email of the current user (customer email) which only retrieves an empty result (Microsoft Store ID key).
function getCustomerCollectionsId() {
var token = getTokenFromAzureOAuthAsync().done(function (aadToken) {
if (aadToken) {
storeContext.getCustomerCollectionsIdAsync(aadToken, "***@hotmail.com")//"kim@example.com"
.done(function (result) {
output.innerText = result;
if (!result) {
WinJS.log && WinJS.log("getCustomerCollectionsIdAsync failed.", "sample", "error");
}
});
}
});
}
function getCustomerPurchaseId() {
var token = getTokenFromAzureOAuthAsync().done(function (aadToken) {
if (aadToken) {
storeContext.getCustomerPurchaseIdAsync(aadToken, "***@hotmail.com")//"kim@example.com"
.done(function (result) {
output.innerText = result;
if (!result) {
WinJS.log && WinJS.log("getCustomerPurchaseIdAsync failed.", "sample", "error");
}
});
}
});
}