I am trying to add licensing to my app. When I call:
ClientResult<AppLicenseCollection> licenseCollection = Microsoft.SharePoint.Client.Utilities.Utility.GetAppLicenseInformation(clientContext, productId);
clientContext.Load(clientContext.Web);
clientContext.ExecuteQuery();
this results in:
Access Denied: The app could not be authenticated or is not authorized to query licenses of this Product ID.I have added both a license and the app to my sharepoint site.
Any idea what could be happening?
Thanks!