Interview Prep/Azure/Identity, Access and Governance

Someone deleted a production resource group last night. How do you find out who, and prevent it?

IntermediateScenarioIdentity, Access and Governance
Answer

Situation read → Activity Log answers who; locks and RBAC prevent the repeat.

What I'd do →

  1. Query the Activity Log at subscription level (the RG is gone):
    az monitor activity-log list --offset 2d \
      --query "[?operationName.value=='Microsoft.Resources/subscriptions/resourceGroups/delete'].{who:caller, when:eventTimestamp, rg:resourceGroupName}" -o table
    
  2. Restore from IaC plus data backups (Azure Backup, storage soft delete, SQL long-term retention)
  3. Add CanNotDelete locks on prod RGs holding state
  4. Remove standing write access in prod; move humans to PIM

Why → Locks stop accidents by anyone, including Owners, without blocking normal updates.

Interview tip → Mention that you rebuilt from code; it proves IaC was real.

Azure All Azure questions Roadmap: Azure core services

More on Identity, Access and Governance