Using Filters in Calculated Custom Licenses

Using Filters in Calculated Custom Licenses

Using Filters in Calculated Custom Licenses

Filters let you narrow a calculated custom license so it only counts the users, licenses, or subscription data that match the billing rule.

This is useful when one Microsoft tenant contains different departments, business units, domains, or excluded users.

Common filter use cases

  • Bill only users from one domain.
  • Bill users from one department or location.
  • Exclude disabled users from managed-user billing.
  • Count only licensed users.
  • Include or exclude users based on extension attributes.
  • Count users assigned to specific Microsoft license SKUs.

Supported filter areas

Filter areaExampleTypical use
DepartmentDepartment equals FinanceDepartment or cost-centre billing.
Location / office fieldsOffice equals SydneySite-based billing.
User typeUser type equals MemberExclude guests from managed-user billing.
Account enabledAccount enabled equals trueExclude disabled leavers.
DomainDomain equals customer.comSplit billing by brand, franchise, or business unit.
Assigned license SKUFriendly name equals Microsoft 365 Business PremiumBill users with a specific Microsoft license.
Extension attributes 1 to 15extensionAttribute1 equals ManagedUse customer-specific billing flags.

Domain filters

Domain filters are matched against the normalized domain from the user's UPN or email address.

  • alice@franchiseA.com matches franchiseA.com.
  • bob@franchiseB.com does not match franchiseA.com.

Extension attribute filters

Extension attributes are useful when normal Microsoft fields do not match the billing rule.

  • extensionAttribute1 = Managed
  • extensionAttribute2 = NoBackup
  • extensionAttribute3 = FranchiseA

Use extension attributes only when the customer or MSP has a reliable process for keeping those values accurate.

Filter design tips

  • Start with the simplest filter that matches the billing rule.
  • Avoid billing rules based on fields that are not maintained consistently.
  • Use clear names so users understand why the calculated count exists.
  • Check the calculated result before mapping it to a PSA billing item.
  • For complex rules, create one custom license per billing scenario.

Examples

Bill only users in one domain

Calculation: All active licensed users where domain equals clientbrand.com.

Use when: One tenant contains multiple legal entities or brands.

Bill only managed users

Calculation: All active licensed users where extensionAttribute1 equals Managed.

Use when: Not every Microsoft user in the tenant receives the same MSP service.

Exclude users from backup billing

Calculation: Licensed mailbox users excluding users where extensionAttribute2 equals NoBackup.

Use when: Some users should not be included in mailbox backup billing.