Google Workspace licences count via Apps Script

Hello Everybody,

I was wondering if anybody knew how to get an overview of the licence count (via apps script). We can count the used licences but it would be nice to have a total as well, especially for the archive licences.

Anybody has a solution or can point me to the right solution? Preferably via SKUs :).

Many thanks

Jan-Willem

 

1 5 1,477
5 REPLIES 5

@Jan-Willem I can't answer re: using GAS but you will find that GAM will do this handily.  Take a look at https://www.ditoweb.com/2021/03/using-open-source-google-apps-manager-to-administer-google-workspace... and https://github.com/taers232c/GAMADV-XTD3/wiki/Licenses 

HTH, KAM

Hey KAM,

We know about the GAM or GAMADV-way but for some cases we use GAS (like this one). Many thanks for your help but i'm really trying to find a solution with GAS :).

 

Jan-Willem

If you are a reseller....  awith the reseller API you can get all of the subscriptions, and therefore calculate the different licence counts for each type of subscription/ or per client)

otherwise no, you cannot get the total available licences from within the domain, only the list of currently used ones. you need to add that as a fixed variable to your script and update it as required)

Hey @AlanM,

Thanks for your reply, at the moment we have indeed a fixed variable but it's not feasible in the future. 

Maybe i should do a feature request for this. Surely i'm not the only one with this 'issue'. 

 

@Jan-Willem - I have published this google sheet add-on in marketplace which would help bulk manage licensing

https://www.goldyarora.com/g-license-manager/

if your use case is more towards being notified when you run low on licensing, check out this apps script based solution

https://www.goldyarora.com/license-notifier/

Top Labels in this Space