---
title: "How Datadog’s IT team automated account inactivity and SaaS spend management"
description: "Datadog extended its Clarity tool into Clarity License Manager, a set of Python AWS Lambda microservices backed by Postgres on RDS."
url: "https://swe.quest/articles/how-datadog-s-it-team-automated-account-inactivity-and-saas-spend-management-ab71bc7240eb358a"
canonical: "https://www.datadoghq.com/blog/engineering/how-datadogs-it-team-automated-account-inactivity-and-saas-spend-management/"
source: "Datadog Engineering"
published: "2022-05-12"
difficulty: "medium"
kind: "Case study"
reading_minutes: 11
tags: ["identity-auth","cost-optimization","serverless","python","microservices"]
---

# How Datadog’s IT team automated account inactivity and SaaS spend management

A post on [Datadog Engineering](https://swe.quest/sources/datadog.md), published 2022-05-12, 11 min read, Case study. Original: [https://www.datadoghq.com/blog/engineering/how-datadogs-it-team-automated-account-inactivity-and-saas-spend-management/](https://www.datadoghq.com/blog/engineering/how-datadogs-it-team-automated-account-inactivity-and-saas-spend-management/)

## Summary

Datadog extended its Clarity tool into Clarity License Manager, a set of Python AWS Lambda microservices backed by Postgres on RDS. It tracks per-app user activity from SaaS APIs and Google Workspace SAML audit logs, warns inactive users via Slack, and auto-deactivates accounts after a configurable threshold (default 90 days). Each SaaS app is integrated through a shared adapter/interface (get\_users, get\_last\_activity\_data, deactivate\_user, activate\_user) with YAML config for thresholds, notification counts and custom activity definitions, such as Zoom Pro usage. Accounts are restored in seconds through a Freshservice ticket, and the team chose to build rather than buy over concerns about privileged access, privacy, per-seat cost and limited customizability.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Cost optimization](https://swe.quest/tags/cost-optimization.md) (Reliability & operations)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [Microservices](https://swe.quest/tags/microservices.md) (Backend & APIs)

## Prerequisites

- AWS Lambda ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- SAML single sign-on
- Python classes and interfaces ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))

## Keywords

Clarity License Manager, AWS Lambda, Amazon RDS, Google Workspace, Workday, Freshservice, Slack, Zoom

## Related posts

- [How Datadog’s IT team automated monitoring third-party accounts](https://swe.quest/articles/how-datadog-s-it-team-automated-monitoring-third-party-accounts-a539b0212702c295.md): Datadog Engineering · 2021-04-30 · Medium · 10 min read · Identity & auth, Observability, Serverless, Security
  Clarity is an internal tool that audits accounts in SaaS apps like Slack, GitHub, Zoom and Google Workspace against Workday, the HR source of truth, and flags any account that doesn't match an active employee.
- [Security Disclosure Recommendation: Check for Anomalous AWS Access](https://swe.quest/articles/security-disclosure-recommendation-check-for-anomalous-aws-access-56c87760658990bd.md): Railway · 2026-10-22 · Medium · 2 min read · Incidents & postmortems, Cloud platforms, Identity & auth, Security
  If an AWS access key used with Railway may have been exposed, deactivate it, replace it, redeploy, and audit what it did.
- [What's New in Managed Deep Agents: schedules, per-run configuration, and Slack reactions](https://swe.quest/articles/what-s-new-in-managed-deep-agents-schedules-per-run-configuration-and-slack-e27b691eaef19a3a.md): LangChain · 2026-10-07 · Medium · 4 min read · AI agents, Configuration management, Communications
  Managed Deep Agents v0.9 adds three features: a Schedules SDK, per-run agent configuration, and Slack reactions.
- [Designing MCP tools for agents: Lessons from building Datadog’s MCP server](https://swe.quest/articles/designing-mcp-tools-for-agents-lessons-from-building-datadog-s-mcp-server-d09621598f568627.md): Datadog Engineering · 2026-03-04 · Medium · 8 min read · AI agents, API design, LLMs, Observability
  Thin API wrappers make poor MCP tools: agents flood their context windows, blow token budgets on oversized records, and infer trends from raw samples.
- [How Snyk Turned an Internal Support Agent into a Customer Feature](https://swe.quest/articles/how-snyk-turned-an-internal-support-agent-into-a-customer-feature-434ebab4f8fa6bc9.md): LangChain · 2026-10-09 · Medium · 7 min read · AI agents, Evaluation, LLMs, Identity & auth
  Snyk Assist, a LangGraph-based conversational agent, grew from an internal support triage tool into a feature in the core Snyk product, keeping one agent runtime behind Slack, web and API surfaces.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
