Azure interview questions

25 questions from the Azure course, each with the correct answer and an explanation. Try to answer before you open the answer.

Azure Foundations

1. What is an availability zone?

  1. A physically separate location inside a region with independent power, cooling and network
  2. A paired region in another country
  3. A billing boundary for a team
  4. A virtual network inside a subscription
Show answer

Answer: A physically separate location inside a region with independent power, cooling and network

Zones are separate datacentre locations inside one region, so a zone-redundant design survives one location failing.

Lesson: What Azure Is and How It Is Laid Out

2. You want every resource of a short-lived demo removed in one step. What is the best grouping?

  1. One subscription per resource
  2. Tag each resource and delete them one by one
  3. Create a management group for the demo
  4. Put all demo resources in one resource group and delete the group
Show answer

Answer: Put all demo resources in one resource group and delete the group

A resource group shares a lifecycle; deleting it deletes every resource inside.

Lesson: Tenants, Subscriptions and Resource Groups

3. Which component checks permissions and policy for every Azure management request?

  1. Azure Front Door
  2. Azure Monitor
  3. Azure Resource Manager
  4. Cloud Shell
Show answer

Answer: Azure Resource Manager

Portal, CLI, PowerShell, SDKs and templates all go through Azure Resource Manager.

Lesson: Portal, CLI, PowerShell and Infrastructure as Code

Identity and Access

4. Which object do you grant Azure roles to when an application needs access in your tenant?

  1. The app registration's redirect URI
  2. The resource group tag
  3. The service principal
  4. The client secret
Show answer

Answer: The service principal

The service principal is the app's identity inside your tenant; role assignments target it.

Lesson: Microsoft Entra ID

5. A CI pipeline must deploy resources into one resource group but must never grant access to others. Which built-in role at which scope fits best?

  1. Owner on the subscription
  2. Contributor on that resource group
  3. User Access Administrator on the resource group
  4. Reader on the subscription
Show answer

Answer: Contributor on that resource group

Contributor can manage resources but cannot change role assignments, and the resource-group scope limits the blast radius.

Lesson: Azure Role-Based Access Control

6. Several VMs in a scale set and a deployment slot must share one identity that outlives them. What should you use?

  1. A user-assigned managed identity
  2. A system-assigned managed identity
  3. A storage account key
  4. A personal user account
Show answer

Answer: A user-assigned managed identity

User-assigned identities are independent resources that can be attached to many resources and keep their role assignments.

Lesson: Managed Identities

Compute Choices

7. Which option is cheapest for an interruptible overnight batch job?

  1. Spot VMs
  2. Premium SSD v2 disks
  3. A single VM in an availability set
  4. Ultra disks
Show answer

Answer: Spot VMs

Spot VMs are heavily discounted but can be evicted, which a restartable batch job tolerates.

Lesson: Virtual Machines and Scale Sets

8. What does a deployment slot swap give you?

  1. A cheaper App Service plan
  2. Automatic database migrations
  3. A free custom domain
  4. A warmed-up release that can be swapped back if it misbehaves
Show answer

Answer: A warmed-up release that can be swapped back if it misbehaves

Slots let you validate and warm a release before routing production traffic to it, and swapping back is quick.

Lesson: Azure App Service

9. A team wants containers with HTTPS ingress, revisions and scale-to-zero, without managing Kubernetes. Which service fits?

  1. Azure Kubernetes Service
  2. Virtual Machine Scale Sets
  3. Azure Container Apps
  4. Azure Container Registry
Show answer

Answer: Azure Container Apps

Container Apps offers those features as a serverless platform; AKS exposes and requires you to run Kubernetes.

Lesson: Containers: ACI, Container Apps and AKS

Serverless and Integration

10. Which plan avoids cold starts with pre-warmed instances?

  1. Consumption
  2. Free App Service
  3. Premium
  4. Azure Container Instances
Show answer

Answer: Premium

The Premium plan keeps always-ready instances warm; consumption-style plans scale to zero.

Lesson: Azure Functions

11. IoT devices send millions of telemetry readings per minute that several analytics jobs must read and replay. Which service fits?

  1. Service Bus queue
  2. Event Hubs
  3. Event Grid
  4. Azure Files
Show answer

Answer: Event Hubs

Event Hubs is built for partitioned, high-throughput streams that consumers can read independently and replay.

Lesson: Service Bus, Event Grid and Event Hubs

12. Where would you configure per-client rate limits and JWT validation for a set of APIs?

  1. Azure API Management policies
  2. An Event Hubs partition
  3. A storage account tier
  4. A VM availability set
Show answer

Answer: Azure API Management policies

APIM policies handle cross-cutting gateway concerns such as authentication checks and throttling.

Lesson: API Management and Logic Apps

Storage and Databases

13. A storage account must survive the loss of one availability zone but data must stay in one region. Which redundancy option fits?

  1. ZRS
  2. LRS
  3. GRS
  4. RA-GRS
Show answer

Answer: ZRS

ZRS keeps synchronous copies in three zones of the same region.

Lesson: Storage Accounts, Tiers and Redundancy

14. A development database is idle most nights and weekends. Which Azure SQL option reduces cost most directly?

  1. Business Critical tier
  2. Active geo-replication
  3. SQL Managed Instance
  4. Serverless compute tier with auto-pause
Show answer

Answer: Serverless compute tier with auto-pause

Serverless auto-pauses when idle, so you pay only for storage during those periods.

Lesson: Azure SQL and Azure Database for PostgreSQL

15. Which consistency level is the Cosmos DB default and guarantees a client reads its own writes?

  1. Strong
  2. Eventual
  3. Session
  4. Consistent prefix
Show answer

Answer: Session

Session consistency is the default and gives read-your-own-writes within a client session.

Lesson: Azure Cosmos DB

Networking

16. VNet A is peered with B, and B is peered with C. Can A reach C directly?

  1. Yes, peering is transitive
  2. Only if all three are in the same subscription
  3. No, peering is not transitive without extra routing or a direct peering
  4. Only over the public internet
Show answer

Answer: No, peering is not transitive without extra routing or a direct peering

VNet peering is non-transitive; you need a direct peering or a hub with a router or firewall.

Lesson: Virtual Networks, Subnets and NSGs

17. After adding a private endpoint, an app still connects to the storage account's public IP. What is the most likely cause?

  1. The storage tier is Cool
  2. Private DNS zone is missing or not linked to the app's VNet
  3. The NSG priority is 100
  4. The account uses ZRS
Show answer

Answer: Private DNS zone is missing or not linked to the app's VNet

Name resolution must return the private IP; that needs the privatelink DNS zone linked to the client VNet.

Lesson: Private Endpoints and DNS

18. You need a single global HTTPS entry point with WAF and edge caching that fails over between two regions. Which service fits best?

  1. Azure Front Door
  2. Azure Load Balancer
  3. Application Gateway
  4. Network security group
Show answer

Answer: Azure Front Door

Front Door is the global layer-7 service with WAF, caching and multi-region routing.

Lesson: Load Balancing Options

Infrastructure as Code, Delivery and Monitoring

19. What does `az deployment group what-if` do?

  1. Shows predicted creates, changes and deletes without applying them
  2. Deletes resources not in the template
  3. Converts Terraform to Bicep
  4. Rolls back the last deployment
Show answer

Answer: Shows predicted creates, changes and deletes without applying them

what-if previews the changes a deployment would make, so you can review them first.

Lesson: Bicep Templates

20. Why is OIDC federation preferred over storing a client secret in GitHub?

  1. It makes deployments run faster
  2. It removes the need for RBAC roles
  3. It only works with Bicep
  4. No long-lived secret is stored; each run gets a short-lived token scoped by a trust rule
Show answer

Answer: No long-lived secret is stored; each run gets a short-lived token scoped by a trust rule

Federation exchanges a short-lived GitHub token for an Azure token, so there is nothing to leak or rotate.

Lesson: CI/CD with GitHub Actions and OIDC

21. Where are resource diagnostic logs and Application Insights data queried with KQL?

  1. Azure Container Registry
  2. Azure Key Vault
  3. Log Analytics workspace
  4. Blob Archive tier
Show answer

Answer: Log Analytics workspace

Logs are stored in a Log Analytics workspace, where KQL queries run.

Lesson: Azure Monitor, Application Insights and KQL

Security, Cost and Well-Architected Practice

22. Which Azure Policy effect blocks a non-compliant resource from being created?

  1. audit
  2. append
  3. deny
  4. disabled
Show answer

Answer: deny

The deny effect rejects the request at Resource Manager before the resource is created.

Lesson: Key Vault, Azure Policy and Defender for Cloud

23. A VM runs 24×7 for the next three years with a fixed size. What usually gives the largest discount?

  1. Spot VMs
  2. A three-year reservation (or savings plan)
  3. Moving disks to Archive tier
  4. A budget alert
Show answer

Answer: A three-year reservation (or savings plan)

Long-term commitments such as reservations and savings plans give large discounts for steady usage.

Lesson: Cost Management

24. A request flows through two services in series with SLAs of 99.95% and 99.99%. What is the approximate composite availability?

  1. About 99.94%
  2. 99.99%
  3. 99.95%
  4. 100%
Show answer

Answer: About 99.94%

For dependencies in series, multiply the availabilities: 0.9995 × 0.9999 ≈ 0.9994.

Lesson: The Azure Well-Architected Framework

25. A Contributor on a resource group tries to give a teammate access to it. What happens?

  1. It succeeds because Contributor has full access
  2. It succeeds only for Reader access
  3. It fails because roles cannot be scoped to resource groups
  4. It fails because Contributor cannot manage role assignments
Show answer

Answer: It fails because Contributor cannot manage role assignments

Contributor can manage resources but not access; granting roles needs Owner, User Access Administrator or a role with role-assignment permissions.

Lesson: Azure Revision and Interview Questions

← Back to the course