I have a collection of apps script functions to get user information into a spreadsheet which work fine. Now I'm trying to add a column with the user's license type. My understanding is that I need to use "Enterprise License Manager API service settings", which I have added but I was getting errors "Error retrieving license for user@domain: Cannot read properties of undefined (reading 'LicenseAssignments')". I am not a superadmin, but I do have delegated privileges. I've been through the various documents on this and my understanding is that I had to do the following:
I run the standard script downloaded from Google's github apps script samples and I get an error "GoogleJsonResponseException: API call to licensing.licenseAssignments.listForProduct failed with error: Unauthorized operation for the given domain. at getLicenseAssignments(getLicenses:7:61)"
}
As someone who's quite new to this environment, have I done the right things? What have I missed?
thank you in advance