The Simplest Way to Make Drone and Microsoft Entra ID Work Like They Should
Teams pair drone and microsoft entra id to manage build pipelines with central user logins. This setup lets developers run tests and ship code using one corporate identity. Drone runs code builds in small containers when your team pushes changes to source control. Microsoft Entra ID holds your company directory, user groups, and login rules. Linking them stops teams from making extra local accounts for build servers. You control who can view logs, trigger builds, or change pipeline secrets from
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams pair drone and microsoft entra id to manage build pipelines with central user logins. This setup lets developers run tests and ship code using one corporate identity.
Drone runs code builds in small containers when your team pushes changes to source control. Microsoft Entra ID holds your company directory, user groups, and login rules. Linking them stops teams from making extra local accounts for build servers. You control who can view logs, trigger builds, or change pipeline secrets from one place.
How drone and microsoft entra id share login data
Drone relies on your git provider to check user identities during login. You connect your git server to Microsoft Entra ID using standard web login protocols. When a developer opens Drone, the app sends them to the git login screen. The git server then asks Microsoft Entra ID to check the user.
Microsoft Entra ID checks the user password and runs a multi-factor step. It also checks group memberships and device health rules set by your security team. Once approved, the directory sends a signed token back to the git server. Drone reads the user profile and repo roles from that git session.
This chain keeps user roles in sync across both tools. If an engineer leaves the company, you disable their account in Microsoft Entra ID. That single change blocks their login to source control and Drone right away. Teams do not need to clean up old build accounts by hand.
Common failure modes and how to scope roles
Many teams use one shared service account to link their build servers and cloud tools. This habit creates huge blind spots in your security logs. When a shared token triggers a bad build, nobody knows which person ran it. Shared keys also tend to have broad write rules across every repo.
Broad tokens put your production servers and databases at high risk. If an attacker steals a wide build token, they can read private code and secrets. They can also push bad code straight into your live cloud accounts. Unlogged queries and silent secret reads make incidents much harder to fix.
Microsoft Entra ID (Azure AD) + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
You can fix this by scoping roles tightly in Microsoft Entra ID. Create separate groups for code readers, build runners, and pipeline admins. Map those exact groups to repo permissions inside your source control tool. Drone will pick up those narrower permissions the next time each user logs in.
You should also lock down network paths between Drone runners and your cloud targets. Place build runners in private subnets with strict firewall rules. Give each runner a narrow cloud identity instead of a long-lived master key. Log every build trigger and secret read with a clear user name.
Keeping build secrets and database runs safe
Build pipelines often need to run database migrations or check live data. Storing raw database passwords inside Drone secrets creates a big risk for your team. Any developer who can edit the build file might print those secrets in logs. A better approach separates user identity from raw target credentials.
You can also add data masking when pipelines or engineers query production databases. Masking rewrites matched fields like emails, phone numbers, card numbers, and national IDs in results. This keeps sensitive customer data out of build logs and test outputs. Your team gets clean test runs while keeping audit records complete.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Can Drone connect to Microsoft Entra ID without a git server?
No, Drone always uses your linked git host to handle user logins. You must link Microsoft Entra ID to your git host first to use single sign-on.
How do we stop former staff from running Drone builds?
Remove the user from your active groups inside Microsoft Entra ID. Once their git session expires, Drone will block them from viewing or running any builds.
What is the safest way for Drone runners to reach cloud resources?
Assign a scoped managed identity to your runner host instead of storing static keys. Grant that identity only the exact permissions needed for that single build task.
Related guides
In this post