The first day for a new hire should be about excitement and integration, not frustration and access requests. Yet, how often does a new team member spend their first hours (or days) waiting for accounts to be created, permissions to be granted, and access to essential tools to be approved? Manual onboarding is a disorganized scramble of emails, tickets, and checklists that is inefficient, prone to error, and a significant security risk.
What if you could treat your entire organizational structure like you treat your infrastructure? What if user provisioning, team management, and access control were all defined in code, version-controlled, and automated?
This isn't a futuristic dream. This is Directory as Code, the core principle behind directory.do. Let's walk through how you can transform your chaotic onboarding process into a streamlined, automated workflow.
Before we build a better system, let's acknowledge the problems with the old way:
Directory as Code is a new paradigm for identity and access management. It means defining your org structure—users, teams, reporting lines, and group memberships—in simple, human-readable configuration files.
With directory.do, you use a powerful, developer-first API to represent your entire organization. These definitions become the single source of truth. When a change is made to the code, our agentic workflows kick in to automatically enforce that change across all your integrated systems, from identity providers like Google Workspace and Azure AD to your everyday SaaS tools.
Let's onboard a new Senior Software Engineer, Charlie Brown, to the team. Instead of a flurry of emails, we'll make one simple, declarative change.
First, we define Charlie's identity as a JSON object. This file contains all the essential information: his name, title, manager, and the groups he should belong to. This single definition dictates his place in the company.
{
"user": {
"id": "usr_a1b2c3d4e5f6g7h8",
"name": "Charlie Brown",
"email": "charlie.b@example.com",
"title": "Senior Software Engineer",
"status": "active",
"manager": {
"id": "usr_z9y8x7w6v5u4t3s2",
"name": "Diana Prince",
"email": "diana.p@example.com",
"title": "Engineering Manager"
},
"groups": [
"engineering",
"project-apollo-devs",
"all-employees"
]
}
}
By defining him as a member of the "engineering" and "project-apollo-devs" groups, we've already specified the access he'll need.
This user definition file lives in a version control system like Git. To initiate the onboarding, a manager or IT admin simply commits this new file to the main branch. This action creates a permanent, auditable record of the change. You can see who authorized the new hire, when they were added, and their exact permissions—all in your Git history.
This is where the magic happens. The moment the code is committed, directory.do's agentic workflow detects the change and springs into action:
When Charlie Brown arrives for his first day, there's no waiting. He signs in with his new credentials and immediately has access to everything he needs to be productive. He can see his team structure, find colleagues in the directory, and start contributing from minute one.
The power of Directory as Code extends far beyond the first day. The same simple workflow manages the entire employee lifecycle:
Stop wrestling with manual user management. By embracing Directory as Code, you can build a more secure, efficient, and scalable organization. Let developers and IT teams focus on building great products, not on resetting passwords and creating accounts.
Ready to streamline your user provisioning and manage your organization as code? Visit directory.do to learn more and see our agentic workflows in action.