If you've ever heard serverless and thought it was just marketing, that's understandable. The name is confusing because servers still exist — you just stop being responsible for them. Azure Functions is Microsoft's serverless service, and in 2026 it's one of the most widely used for building event-driven backends, lightweight APIs, data pipelines, and, increasingly, tooling for AI agents.


What Azure Functions solves

The traditional model for deploying code to the cloud involves provisioning a server or container, configuring it, keeping it running even when there's no traffic, and paying for that time even when it's idle. It works well for applications with consistent traffic, but it's inefficient for tasks that run when something happens: a file arrives, someone makes an HTTP request, a schedule is met, a message lands in a queue.

Azure Functions inverts that model. You write the code, define what triggers it, and Azure handles running it when that happens. You don't pay when it's not running. You don't configure servers. You don't think about scaling because the service scales automatically in response to demand.

The model has a more precise technical name: Functions as a Service (FaaS). Serverless is the broader umbrella, but FaaS is what Azure Functions concretely implements.


Supported languages

Azure Functions officially supports C#, Java, JavaScript, TypeScript, Python, and PowerShell. It also has support for Go and Rust, though with less native integration. If you come from the web world and work with JavaScript or TypeScript, you can start with what you already know.


Now, the two concepts you need to understand well

Before writing a single line of code, you need to be clear on two concepts that will appear throughout all the documentation.

Triggers are the events that make your function run. A function has exactly one trigger. Some examples: an HTTP request arrives at a URL, a defined schedule is met, a message arrives in an Azure Storage queue, a file is uploaded to a blob container, or an event arrives from Azure Event Grid or Event Hubs.

Bindings are declarations that connect your function to other Azure services without you having to write that connection code by hand. There are input bindings for reading data and output bindings for writing data. A concrete example: you have a function that fires when a file arrives in Blob Storage, reads that file, processes it, and writes the result to a Cosmos DB table. Instead of writing the Blob SDK and the Cosmos DB SDK inside the function, you declare those connections as bindings and Azure handles authentication and data injection.

const { app } = require("@azure/functions");

app.http("myFirstFunction", {
  methods: ["GET", "POST"],
  authLevel: "anonymous",
  handler: async (request, context) => {
    context.log("Function executed");
    const name = request.query.get("name") || "world";
    return { body: `Hello, ${name}` };
  },
});

Basic HTTP trigger in JavaScript using the new Azure Functions programming model.


Hosting plans and which one to choose today

This is the part where most people get lost because the documentation lists many options and it's not always clear when to use each one. In 2026, Microsoft explicitly recommends the Flex Consumption plan for new serverless projects.

If you find documentation that talks about the .NET in-process model as if it's the current option, that material is outdated. The in-process model is scheduled for retirement in November 2026. The correct model today is the isolated worker model.

PlanKey characteristics
ConsumptionFree grant of 1M executions and 400k GB-s per month. No VNet, 10-minute limit, cold starts of 2-7s on isolated .NET. Linux Consumption plan retiring September 2028
Flex ConsumptionRecommended for new projects. Faster cold starts, VNet integration, per-function scaling, configurable concurrency. Free grant of 250k executions and 100k GB-s per month. 99.95% SLA
PremiumEliminates cold starts with pre-warmed instances. Minimum ~$146/month. Justified only when cold starts affect real user experience
DedicatedRuns on an existing App Service. Makes sense if you already have paid infrastructure, but loses much of serverless's value

Durable Functions for when a single execution isn't enough

Azure Functions has an execution time limit. If you need to orchestrate a longer workflow — processing thousands of files in sequence, coordinating multiple calls to external APIs, or handling approvals that can take hours — Durable Functions exists for that.

Durable Functions is an extension that lets you write stateful workflows in a serverless environment. The runtime handles checkpoints, retries, and recovery automatically. If an instance fails mid-workflow, the system resumes from where it left off.

import azure.durable_functions as df

def orchestrator_function(context: df.DurableOrchestrationContext):
    result1 = yield context.call_activity("ProcessData", "input1")
    result2 = yield context.call_activity("SendEmail", result1)
    return result2

main = df.Orchestrator.create(orchestrator_function)

Basic orchestration with Durable Functions in Python.


Azure Functions and AI agents in 2026

A trend in 2026 is using Azure Functions as serverless infrastructure for AI agents. Support for MCP (Model Context Protocol) servers reached general availability with OBO (On-Behalf-Of) authentication, allowing AI agents to securely access external tools and data using Microsoft Entra ID identities.

In practical terms, this means you can deploy an MCP server on Azure Functions and have agents from GitHub Copilot, Microsoft 365 Copilot, or other compatible clients invoke the tools you expose, with enterprise authentication included and without managing your own infrastructure.


"The learning curve for Azure Functions is gentler than it looks. If you know how to write a function in any language and understand what an event is, you already have what you need to get started."

  • Carlos José Castro Galante

To wrap up

The free Azure account includes credits, and the Consumption plan's free grant easily covers learning usage. For the Flex Consumption plan, the first 250,000 executions per month are free.

Official Azure Functions documentation on Microsoft Learn