Keep Your Microsoft 365 E5 Developer Tenant Active Automatically
说明与用途
使用 Microsoft Graph API 和 GitHub Actions 的自动化工作流可持续保持免费 Microsoft 365 E5 开发者租户的活跃状态,防止 90 天无活动后被自动终止。
问题
Microsoft 365 Developer Program sandboxes expire after 90 days of inactivity, risking permanent loss of users, mailboxes, and configurations.
结果
The automated, serverless solution keeps the Microsoft 365 E5 developer tenant alive by generating periodic telemetry events via Graph API, preventing the 90‑day inactivity expiration.
工作流
- Register a daemon app in Microsoft Entra ID with required permissions and client secret.
- Create a Python script (keepalive.py) that obtains an OAuth2 token, queries users, and creates a calendar event to simulate developer activity.
- Store tenant, client, and secret IDs as GitHub secrets.
- Set up a GitHub Actions workflow (keepalive.yml) that runs the script on a cron schedule (e.g., every 12 hours).
证据
The Microsoft 365 Developer Program provides a free 25-user E5 enterprise sandbox subscription (worth over $1,300/year). However, it comes with a strict condition: it expires every 90 days unless Microsoft detects continuous developer activity.
Here is an automated, serverless solution using Microsoft Graph API and GitHub Actions to generate valid developer telemetry and maintain your tenant indefinitely.
- 记录日期: 2026-11-01T18:59:04.293Z