License Estimation
Licensing is based on the maximum number of distinct users observed over the last 30 days. A 10% tolerance is recommended to absorb natural fluctuations.
Estimation Formula
Section titled “Estimation Formula”Use this baseline formula:
required_license_users = ceil(max_distinct_users_30d * 1.10)Example:
- Maximum users seen in last 30 days:
2,500 - With tolerance:
ceil(2500 * 1.10) = 2,750 - Choose the next available license tier at or above this value.
Get User Activity from Microsoft Graph
Section titled “Get User Activity from Microsoft Graph”Use the Teams activity report endpoint:
- API doc: Microsoft Graph report endpoint
-
Request the pre-authenticated report URL:
Terminal window curl "https://graph.microsoft.com/v1.0/reports/getTeamsUserActivityUserCounts(period='D180')" \-H "Authorization: Bearer ${access_token}"Expect an HTTP
302response with aLocationheader. -
Download the report from the
LocationURL:Terminal window curl "https://reports.office.com/data/download/<report-id>" -o teams-user-activity.csv -
Calculate the maximum daily user count over your chosen window (at least 30 days).
Recommended Sizing Workflow
Section titled “Recommended Sizing Workflow”- Run the report on
D180to capture seasonal peaks. - Compute max users for 30, 90, and 180-day windows.
- Use the highest relevant value for your contract period.
- Add 10% headroom.
- Re-check quarterly or after major organizational changes.