- What is Azure?
Ans:- Azure is the cloud computing platform provide by Microsoft, offering wide range of services for building, deploying and managing application and infrastructure.
- What is Cloud Computing?
Ans:- A cloud computing is the delivery of computing services like servers, storage, database, networking, software and AI over the networking (called as cloud) insted of using physical hardware or local server.
- What are the cloud computing service models? explain the differences
Ans:- The three primary cloud computing service models are Infrastructure as a Service (IaaS), Platform as a Service PaaS), and Software as a Service (SaaS). These models represent different layers of the cloud computing stack and define the division of responsibility between you (the customer) and the cloud provider.
- Infrastructure as a Service (IaaS)
IaaS provides on-demand access to fundamental computing resources like virtual machines, physical servers, storage, and networking over the internet.
- Platform as a Service (PaaS)
PaaS offers a cloud-based environment equipped with everything needed to build, test, deploy, and manage applications.
- Software as a Service (SaaS)
SaaS delivers a fully functional, ready-to-use software application hosted entirely by the vendor and accessed via a web browser or mobile app.
- Infrastructure as a Service (IaaS)
- What is Hybrid Cloud?
Ans:- A hybrid cloud is a computing environment that combines a private cloud (or on-premises data center) with a public cloud (like AWS, Microsoft Azure, or Google Cloud), allowing data and applications to be shared between them using VPN or ExpressRout.
- What is a resource in Azure and how it is different from Azure service
Ans:- In Microsoft Azure, an Azure resource is any manageable item (instanc of a service) that you create and deploy within your cloud environment. For example, when you create a virtual machine, database, or storage account, each one is an Azure resource.
- What is resource group?
Ans:- A resource group is a logical container that holds related azure resources. It allows you to manage, organize and control resources efficiently.
- What is Virtual Machine? When would you use it in project?
Ans:- A virtual machine is a cloud base virtual server (software-based simulation of a physical computer) that its own operating system and allows user to run application.
You might use a VM when you need a complete isolated server environment, particularly for traditional server deployments, different operating systems, legacy applications, or infrastructure that requires OS-level control.
- What VM Scale Sets? When will you use them in your project?
Ans:- The Azure virtual machine scale set let you ceate and manage group of identical load balanced VMs. The number of VMs in thegroup can be increased and descrease on demand.
- What is Azure App Service and how it different from VM
Ans:- The primary difference lies in the level of control and management. A VM gives you full infrastructure control (IaaS), while App Service eliminates infrastructure management so you can focus entirely on code (PaaS).
- How do you deploy a .NET application to Azure app service?
Ans:- To deploy a .NET application to Azure App Service, you have several methods depending on your workflow. The fastest and most common methods are using GitHub Actions (automated), Visual Studio (manual) and Command Line using Azure CLI(manual).
- What are the different options to deploy a .NET Web API on Azure
Ans:- When hosting a .NET Web API on Azure, you can choose from several cloud computing models depending on the level of control, scalability, and cost efficiency your project requires
- Azure App Service
- Azure Functions
- Azure Container Apps (ACA)
- Azure Kubernetes Service (AKS)
- Azure Virtual Machines
- What are deployment slots in Azure App Service?
Ans:- Azure App Service deployment slots provide separate environments such as staging and production, allowing us to deploy and test a new version safely and then swap it into production with minimal downtime and an easy rollback option.
- What is Blue-Green Deployment in Azure?
Ans:- Blue-green deployment is a deployment strategy where we maintain two production-like environments. The blue environment serves the current production version, while the green environment contains the new version. We deploy and test the new version in green, and once it's validated, we switch production traffic to green. If there's a problem, we can quickly switch traffic back to blue. In Azure App Service, deployment slots such as Production and Staging can be used to implement this pattern. The main benefits are reduced downtime, safer releases, and fast rollback.
- What is Canary Deployment in Azure
Ans:- Canary deployment is a strategy where we release a new application version to a small percentage of production traffic first. We monitor its health using metrics, logs, Application Insights, and business KPIs. If the canary performs well, we gradually increase its traffic until it reaches 100%. If we detect problems, we stop the rollout and route traffic back to the stable version. The main advantage is reducing the blast radius of a bad deployment.
- How do you roll back a failed deployment in Azure?
Ans:- For rollback, I first identify the last known-good version using deployment history and monitoring. If I'm using Azure App Service, I prefer deployment slots: deploy the new version to staging, validate it, and swap it into production.
If the deployment fails after the swap, I can swap the slots back to restore the previous version quickly. Alternatively, I can redeploy the previously successful immutable artifact from Azure DevOps.
For canary deployments, I'd stop the rollout and route traffic back to the stable version. I would also make database migrations backward-compatible because rolling back application code doesn't automatically roll back database changes. Finally, I'd use Application Insights and Azure Monitor to detect errors and trigger or support rollback.
- Why did you choose Azure App Service instead of AKS or Azure VM?
Ans:- Azure App Service is generally chosen over AKS (Azure Kubernetes Service) and Azure VMs because it strikes the perfect balance between speed of delivery, low maintenance, and built-in production features for a standard .NET Web API.
- What is a WebJob inside the Azure App Service?
Ans:-An Azure WebJob is a built-in feature of Azure App Service that allows you to run background tasks, scripts, or programs within the same environment and instance as your main web application. It serves as a way to handle resource-heavy or long-running processes completely outside of your standard web request/response cycle, without requiring separate or costly infrastructure.
- What are the Types of WebJobs
- Continuous
Starts immediately when the WebJob is deployed and runs in a continuous loop. This is ideal for tasks like constantly polling a storage queue or processing data streams.
- Triggered
Runs only when manually started or on a specific schedule using a CRON expression. This is ideal for routine maintenance, like daily file cleanups or hourly report generation.
- Continuous
- What is a CRON expression.
Ans:- A CRON expression is a compact string of text used to define a recurring schedule for automated tasks. It acts as a time-based scheduling language for operating systems (like Linux), cloud platforms, and DevOps software to run background routines—such as database backups, automated emails, or system cleanups—without human intervention.
- What is Azure Functions and when would you use it?
Ans:- Azure Functions is a serverless, event-driven compute service provided by Microsoft Azure. It allows you to run small blocks of code (called "functions") in the cloud without having to provision, manage, or pay for dedicated virtual machines or infrastructure.
- How do you secure Azure Functions using Azure AD and JWT?
Ans:- To secure an Azure Function using Azure Active Directory (now Microsoft Entra ID) and JWT (JSON Web Tokens), you have two primary architectural approaches.
The first approach is Built-in App Service Authentication (Easy Auth), where Azure handles the JWT validation at the infrastructure level before the request even touches your code. The second approach is Manual JWT Validation in Code, which gives you fine-grained control over scopes, roles, and custom claims within your .NET Function.
- How do you implement Role-Based Access Control (RBAC) in Azure Functions?
Ans:- To implement Role-Based Access Control (RBAC) in Azure Functions for a .NET application, you map custom application roles created in Microsoft Entra ID (Azure AD) to user identities. When a user requests a resource, your code inspects the incoming JWT claims to check if the user possesses the required role before granting access.
- How do you handle JWT token expiration and refresh tokens in Azure?
Ans:- I handle JWT expiration by using short-lived access tokens combined with secure refresh tokens via Microsoft Entra ID (formerly Azure AD) and the Microsoft Authentication Library (MSAL), implementing silent token acquisition and global HTTP interceptors for a seamless user experience.
In ASP.NET Core APIs, I configure JWT Bearer authentication with Microsoft Entra ID. The API validates the access token using Entra ID's published signing keys and validates claims such as iss, aud, exp, and scopes or roles.
The frontend or client application uses MSAL to acquire and renew tokens. I normally don't implement a custom refresh-token endpoint when Entra ID is handling authentication.
If MSAL cannot silently acquire a new access token—for example, because the refresh/session state is no longer valid—it returns an authentication requirement. At that point, I redirect the user through the authentication flow again. I don't try to bypass token expiration.
- What are Durable Functions and when should they be used?
Ans:- Durable Functions are an extension of Azure Functions that are used to build stateful and long-running workflows. They help us coordinate multiple functions while automatically maintaining the workflow state, handling retries, checkpoints, and failures.
For example, suppose we have an order-processing workflow: first validate the order, then process payment, reserve inventory, and finally ship the order. With Durable Functions, an orchestrator can coordinate these steps and remember which steps have completed.
I would use Durable Functions when I have a multi-step or long-running process, especially when I need reliable retries, waiting for external events, parallel processing, or human approval. For a simple HTTP-triggered function or a small independent task, I would normally use a regular Azure Function instead.
- Why not just use normal Azure Functions?
Ans:- A normal Azure Function is good for executing an individual piece of work. But when I need to coordinate multiple steps and maintain state between them, managing that state and failure handling manually can become complicated. Durable Functions provide orchestration, state persistence, retries, timers, and recovery as part of the framework, which makes those workflows much easier to implement reliably.
- How do you monitor Azure Functions and receive alerts when they fail
Ans:- Azure Functions are primarily monitored using Azure Monitor Application Insights, which automatically collects logs, performance metrics, and application errors. By coupling Application Insights with Azure Monitor Alerts, you can instantly notify your team via email, SMS, or Slack whenever a function fails.
To receive notifications when failures occur, you need to configure an Alert Rule combined with an Action Group in the Azure Portal
Summary
Preparing for an Azure interview? This comprehensive guide covers the most commonly asked Microsoft Azure interview questions and answers, from basic cloud concepts to advanced and scenario-based topics. Whether you’re a fresher or an experienced cloud professional, this article will help you strengthen your Azure knowledge, understand real-world scenarios, and prepare confidently for your next Azure interview.
Thanks