⚡ ~/naveed Interview Prep
⚡ Portfolio Home 👤 About Naveed Bio & Credentials 📫 Contact Naveed Get In Touch ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 1,000+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
← Back to All Security & DevSecOps Interview Questions Scenario 48 of 55 in Security & DevSecOps
Senior DevOps / SRE Security Azure RBAC & Service Connections Enterprise Azure

Q: The same pipeline and artifact deploy successfully to DEV but PROD returns "AuthorizationFailed". How would you troubleshoot it?

Root-cause triage when an identical deployment artifact and pipeline succeeds in the DEV subscription but throws AuthorizationFailed (The client does not have authorization to perform action) in PROD.

#Azure #RBAC #Security #Azure DevOps #IAM
🎙️ Candidate Opening & Architectural Context
"In enterprise Azure environments, DEV and PROD live in separate Azure Subscriptions with independent Azure DevOps Service Connections and differing Azure Policy guardrails. 'AuthorizationFailed' indicates missing RBAC role assignments or Azure Policy denials."
Advertisement
🛡️
⚡ Recommended DevSecOps Track

Master cloud-native security and container runtime defense: Prepare with KodeKloud's CKS course with live browser-based terminal sandboxes.

Prepare with KodeKloud's CKS Course →

🛠️ Production Runbook & Step-by-Step Resolution

Direct Answer: In enterprise Azure environments, DEV and PROD live in separate Azure Subscriptions with independent Azure DevOps Service Connections and differing Azure Policy guardrails. 'AuthorizationFailed' indicates missing RBAC role assignments or Azure Policy denials.

1

Identify the Exact Action and Resource URI

Examine the error message details. Azure errors specify the exact missing action (e.g., Microsoft.Web/serverfarms/write) and target scope (resource group or subscription URI).

The client 'sp-azdo-prod' with object id '...' does not have authorization to perform 
action 'Microsoft.Web/serverfarms/write' over scope '/subscriptions/.../resourceGroups/rg-prod-app'
2

Compare Service Principal RBAC Roles Across Subscriptions

Check what role the Service Connection's Service Principal holds in DEV versus PROD. Often DEV granted Contributor at the Subscription root, whereas PROD was scoped to Reader or limited to a specific Resource Group.

az role assignment list --assignee <prod-sp-id> --all --output table
Advertisement
3

Audit Azure Policy Deny Actions in PROD

Production subscriptions frequently enforce Azure Policy guardrails (e.g., denying non-standard SKUs, requiring specific tags, or disallowing public IPs) that return AuthorizationFailed with a policy violation details block.

💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Compare Azure RBAC assignments between DEV and PROD Service Principals and inspect Azure Policy compliance logs for automated deny actions."
⚡ 60-Second Elevator Pitch Talking Points
  • Extract the exact missing action and scope URI from the pipeline error log.
  • Compare Service Principal role assignments between DEV and PROD subscriptions.
  • Check if PROD Service Principal has Contributor rights on the target Resource Group.
  • Inspect Azure Policy compliance logs for automated 'Deny' actions triggered by missing tags or SKUs.
⛔ Critical Candidate Mistakes to Avoid in This Scenario

Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:

  1. Revoking compromised credentials immediately without analyzing forensic audit trails for active exploitation when configuring Pipeline Artifact Deploys Deactivating a compromised access key prevents abuse while preserving forensic identity for CloudTrail investigations to assess blast radius.
  2. Terminating compromised instances immediately during incident triage without isolating volatile RAM state when configuring Pipeline Artifact Deploys Terminating compromised instances immediately destroys volatile memory evidence (RAM dumps) required to establish intrusion timelines.
  3. Injecting plaintext secrets into container environment variables rather than fetching from dynamic secret vaults when configuring Pipeline Artifact Deploys Container environment variables are visible via docker inspect or Kubernetes API queries, leaking sensitive API tokens to developers.
  4. Failing to enforce automated credential rotation for third-party SaaS integration tokens when configuring Pipeline Artifact Deploys Static long-lived API tokens shared across internal services represent the highest-probability vector for supply-chain credential compromise.
Advertisement
Want more Security & DevSecOps scenarios?
Explore our complete collection of scenario-based Security & DevSecOps interview runbooks.
Browse All Security & DevSecOps Questions →