Your organization's structure is more than just a chart in a slide deck or a list in an HR system. It's a living, breathing blueprint that dictates who reports to whom, who belongs to which team, and—most critically—who has access to what. Yet, for most companies, managing this blueprint is a messy, manual process plagued by spreadsheets, endless tickets, and siloed admin panels.
The result? Inefficiency, security gaps, and a constant disconnect between the "official" org chart and the reality on the ground.
What if you could manage your entire organizational structure with the same rigor, transparency, and automation that you apply to your software? What if your org chart lived in a Git repo, with changes reviewed, approved, and deployed via pull requests?
This is the promise of Directory as Code, a developer-first approach to identity and access management. And with platforms like directory.do, it's no longer a futuristic concept—it's a practical reality.
Think about the last time a new engineer joined your team. The process probably looked something like this:
This process is slow, error-prone, and impossible to audit effectively. Now, consider the reverse: offboarding. A single missed step can leave a former employee with access to sensitive company data—a massive security risk.
The core problem is that the organizational directory isn't treated as a critical piece of infrastructure. It’s treated as an administrative afterthought.
Directory as Code takes the principles of Infrastructure as Code (IaC) and applies them to your people and teams. Instead of clicking through UIs, you define your users, groups, reporting lines, and permissions in declarative configuration files (like JSON or YAML) or via an SDK.
This "code" becomes your single source of truth. It represents the desired state of your organization. An engine then takes this definition and makes it a reality by automatically making the necessary changes across all your integrated systems.
Here’s what that looks like in practice with directory.do:
{
"user": {
"id": "usr_1a2b3c4d5e6f7g8h",
"name": "Alice Johnson",
"email": "alice.j@example.com",
"title": "Director of Engineering",
"status": "active",
"manager": {
"id": "usr_9i8j7k6l5m4n3o2p",
"name": "Bob Williams"
},
"direct_reports": [
{
"id": "usr_a1b2c3d4e5f6g7h8",
"name": "Charlie Brown"
}
],
"groups": [
"engineering-leads",
"all-employees"
]
}
}
This simple JSON object is a machine-readable, version-controllable definition of a user's place in the organization.
When your directory is code, automation becomes effortless. A manager can submit a pull request to add a new hire to their team. Once merged, an agentic workflow is triggered. This single event can:
This reduces onboarding time from days to minutes and eliminates human error. Offboarding is just as simple and, more importantly, complete. Changing a user's status to inactive can trigger a workflow to immediately revoke access to everything.
No more "org chart drift." Your Git repository becomes the canonical source of truth for your entire organizational structure. directory.do acts as the reconciliation engine, ensuring that this definition is constantly and consistently enforced across all connected services. When you want to know who is on a team, you check the code, not a stale spreadsheet.
Every change to your organization is now a commit.
Need to restructure a team? Create a branch, make your changes, and open a pull request. Your team can review the proposed changes, discuss them, and approve them before they ever go live. This brings an unprecedented level of transparency and collaboration to organizational management.
Security is no longer a guessing game hidden behind dozens of admin UIs. Access control rules are explicitly defined in your codebase. This makes it easy to enforce the principle of least privilege and conduct security audits. You can see exactly why a user belongs to a specific group and what permissions that group grants.
directory.do is the agentic workflow platform built to make Directory as Code a reality. We provide the powerful user management API and automation engine to turn your coded definitions into action.
Instead of you building brittle, custom scripts to talk to every service's API, you simply declare your desired state. Our agents handle the rest, intelligently interacting with your identity providers and SaaS tools to enforce that state. Whether you're syncing with an existing Google Workspace directory or using directory.do as your source of truth, our platform streamlines user provisioning, access control, and team management.
Moving your organizational directory from a static document into a version-controlled codebase is a paradigm shift. It transforms a tedious administrative task into a streamlined, automated, and secure engineering discipline.
Ready to stop clicking and start committing? It's time to manage your organizational directory as code.