Hi @Carim-3868,
Analytics Lisence Usage should use "User" authentication instead of "App Only" authentication:
protected override void RunScenario()
{
string customerIdToRetrieve = this.ObtainCustomerId("Enter the ID of the customer to retrieve");
var partnerOperations = this.Context.UserPartnerOperations;
this.Context.ConsoleHelper.StartProgress("Retrieving customer licenses usage analytics");
var customerLicensesDeploymentAnalytics = partnerOperations.Customers.ById(customerIdToRetrieve).Analytics.Licenses.Usage.Get();
this.Context.ConsoleHelper.StopProgress();
this.Context.ConsoleHelper.WriteObject(customerLicensesDeploymentAnalytics, "Customer licenses usage analytics");
}
Check the demo in GitHub:
Partner Center SDK for .NET Samples
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.