{"product_id":"n8n-workflow-weekly-microsoft-365-license-waste-report","title":"n8n Workflow: Weekly Microsoft 365 License Waste Report","description":"\u003ch3\u003eWeekly Microsoft 365 License Waste Report—Automated Every Monday\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow audits your Microsoft 365 license usage with Microsoft Graph, calculates potentially unused seats (and estimated monthly waste), then emails you an HTML report via Gmail—every Monday at 8:00.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eSchedules a weekly run\u003c\/b\u003e using an n8n schedule trigger (Mondays at 8:00).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eRetrieves your Microsoft 365 SKUs\u003c\/b\u003e by calling the Microsoft Graph API to get all subscribed Microsoft 365 license plans for the tenant.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eFetches up to 999 users\u003c\/b\u003e with license assignments, account status, and sign-in activity via Microsoft Graph.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eAnalyzes license utilization\u003c\/b\u003e to:\n    \u003cul\u003e\n      \u003cli\u003eCalculate unused paid seats per SKU.\u003c\/li\u003e\n      \u003cli\u003eIdentify disabled accounts that still have licenses assigned.\u003c\/li\u003e\n      \u003cli\u003eDetect licensed users who have not signed in for \u003cb\u003e30+ days\u003c\/b\u003e (configurable inactivity threshold).\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eGenerates an HTML email report\u003c\/b\u003e including an estimated monthly waste amount based on a per-seat price map you update in the code.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eSends the report by email\u003c\/b\u003e using Gmail, including the subject line generated by the workflow.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eOptimize Microsoft 365 spend by spotting \u003cb\u003eunassigned licenses\u003c\/b\u003e and unused seats by SKU.\u003c\/li\u003e\n  \u003cli\u003eReduce license costs from accounts that are \u003cb\u003edisabled but still licensed\u003c\/b\u003e.\u003c\/li\u003e\n  \u003cli\u003eIdentify inactive users (inactive for 30+ days) to support offboarding or license reassignment decisions.\u003c\/li\u003e\n  \u003cli\u003eGive SaaS operators and automation engineers a recurring visibility report without manual exports.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eSchedule Trigger\u003c\/b\u003e to run every Monday at 8:00.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eHTTP Request \/ Microsoft Graph API calls\u003c\/b\u003e to read subscribed SKUs and user license\/sign-in data (up to 999 users).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eCode\u003c\/b\u003e node for calculations: unused seats, inactivity detection, and waste estimation logic (including per-seat price mapping and 30-day default threshold).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eGmail\u003c\/b\u003e node to email the generated HTML report to a configured recipient.\u003c\/li\u003e\n  \u003cli\u003eMicrosoft Entra ID app registration using client credentials with Graph scope \u003ccode\u003ehttps:\/\/graph.microsoft.com\/.default\u003c\/code\u003e and permissions including \u003cb\u003eUser.Read.All\u003c\/b\u003e, \u003cb\u003eOrganization.Read.All\u003c\/b\u003e, \u003cb\u003eAuditLog.Read.All\u003c\/b\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45878614032563,"sku":"N8N-18027","price":47.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/ALcMekY013h-yOf2NWKKR_lR2fqlIc.png?v=1787389813","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-weekly-microsoft-365-license-waste-report","provider":"N8N Commerce","version":"1.0","type":"link"}