I'm looking for a way to find out how many licenses I need for apps without having to note which smart groups are assigned to every single app. Ideally it would be a query (API or SQL, doesn't matter) to find an App Name and its license count, as well as the number of devices it is scoped to.
In my mind it seems like such a simple thing, but I don't quite have the knowledge of what each table lists or even which is the correct table to pull that information from in the database.
Does anyone have a script or query that they use themselves to pull this information?
Any help is appreciated!
