Customer Community Login license is a volume-based license:
Each community license can be either a
member-based license or a login-based license. To use a login-based
license, you first purchase a specific number of logins to be used
every month. External users associated with that license consume one
login each time they log into a site. However, logging in multiple
times during the same day still only consumes one login and, once
logged in, switching between sites doesn’t consume extra logins. This
type of login is referred to as a daily unique login.
....therefore it's measured and reported on a monthly basis.
UserLicense should track this kind of usage via
The number of successful logins for all users associated with a
customer or partner portal user license. This field has a non-null
value if MonthlyLoginsEntitlement has a non-null value.
MonthlyLoginsEntitlement fields are not visible to a customer tenant/org, we checked all the way to API v21. Translation: this is a documentation bug.
At some point
TenantUsageEntitlement object was introduced, it is thinly documented. In official SF docs this object shows up as late as v52...and disappears after that. That is, as of this writing v53-... API docs don't show this object yet the object does exist and can be queried. The object has a number of fields, here are the relevant ones:
MasterLabel - human-readable description of entitlement
Setting - entitlement key
Frequency - entitlement term frequency (Monthly, Daily, ...)
Setting is a String key that represents a particular entitlement. For Customer Community Login license, the value of this key is
setting/force.com/orgValue.MaxCustComUniqueLogins. Doing a query on
TenantUsageEntitlement in API v54 with this setting does retrieve the entitlement (
CurrentAmountAllowed) but not actual usage (
AmountUsed is blank) :(
Leaving this incomplete answer up for future updates.