Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

1.2.2. The Principle of Least Privilege

💡 First Principle: Every identity—human or machine—should have exactly the permissions needed to perform its function, no more and no less. Excess permissions create attack surface; insufficient permissions block legitimate work.

This sounds simple but is deceptively difficult. Developers request broad permissions "just in case." Administrators grant Owner roles because it's faster than figuring out specific needs. Over time, permissions accumulate and nobody knows who actually needs what—a phenomenon called "permissions creep."

Least Privilege in Practice:
Bad PracticeLeast Privilege Approach
Grant Owner to developersGrant Contributor to specific resource groups
Permanent admin accessJust-in-Time access via PIM
Service accounts with ContributorManaged identities with custom roles
Shared credentialsIndividual accounts with auditing

Scenario: A developer needs to deploy code to a web app. The lazy approach grants Contributor on the entire subscription. The least-privilege approach grants Website Contributor on just the App Service resource group—plus Reader on the associated Key Vault for secrets. If this developer's credentials are compromised, the blast radius is one application, not the entire subscription.

Alvin Varughese
Written byAlvin Varughese
Founder•15 professional certifications