0

The MSDN docs say "if multiple licenses are purchased for the same app by using different Microsoft accounts, the licenses are returned in the following order of priority: Paid, Free, Unexpired Trial, Expired Trial."

My question is what am I supposed to do when multiple licenses are returned? Is it OK to always take the first license and verify that one, as every example I have found does? Iterate through all of them until I find a valid one? Iterate through all and reject if I find an invalid one?

It's confusing because licenses are really for a user but if the user has been assigned to a Trial license but not the Paid license why would the framework even return the Paid license?

Thanks.

https://msdn.microsoft.com/library/office/jj164035(v=office.15).aspx

0

I am answering my own question in case it helps someone else.

I found the link below which explains "However there is the possibility of two different purchasers buying the same app and assigning a seat to the same user, in that case the call would return multiple licenses. The API is designed to return the most "relevant" license first so in general you should be ok by looking just at the first license." The author of this statement is an expert on the subject in my opinion (based on this and other articles that I have found from him).

So basically I am going to just use the first license returned for validation.

https://social.msdn.microsoft.com/Forums/office/en-US/c2e15d98-6c8c-4fd1-878c-4f3af49163b8/licensing-how-many-licenses-will-getapplicenseinformation-method-return-for-paid-trial-app?forum=appsforsharepoint

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.