Click the image below to watch the video on YouTube.
This quickstart uses Durable Functions with the Durable Task Scheduler backend provider.
In this quickstart, the provided sample uses the official Durable Functions "hello cities" quickstart. The sample schedules orchestrations that include 3 activities via an HTTP trigger.
This quickstart showcases the necessary configuration for using Durable Task Scheduler as the backend provider for your Durable Function app. The template defaults to Elastic Premium EP1 sku plan on Linux.
- Create an active Azure subscription.
- Azure Developer CLI (
azd) installed - .NET 8 SDK
- Azure Functions Core Tools v4 for the
funccommands below
In a terminal window, run the following command to log into the Azure CLI.
az login
azd auth login
-
Clone this repo to your developer machine:
git clone https://github.com/Azure-Samples/Durable-Task-Scheduler.git
-
Navigate to the
hello citiessample directory. The function source code is in itshttp/subdirectory:cd Durable-Task-Scheduler/samples/durable-functions/dotnet/HelloCities -
Open the Application in VS Code:
code .
Use the Azure Developer CLI (azd) to easily deploy the app.
Note: If you open this repo in GitHub CodeSpaces, the
azdtooling is already installed.
-
Find the regions where the Durable Task Scheduler is available:
az provider show --namespace Microsoft.DurableTask --query "resourceTypes[?resourceType=='schedulers'].locations | [0]" --out table -
From the
samples/durable-functions/dotnet/HelloCitiesdirectory containingazure.yaml, run the following command to provision:azd up
-
When prompted, provide:
- A name for your Azure Developer CLI environment.
- The Azure subscription you'd like to use.
- The Azure location to use. This location is related to the location in which you created the resource group, scheduler, and task hub.
Once the azd up command finishes, the app will have successfully provisioned and deployed.
Note: If the deployment finishes with a
"Run-From-Zip is set to a remote URL using WEBSITE_RUN_FROM_PACKAGE or WEBSITE_USE_ZIP app settingerror, you can ignore it.If you get the error
The request may be blocked by network rules of storage accountwhen uploading functions.zip to blob storage, rerun the upload command. There's a command in the deploy script that allow-lists you computer's IP address in the storage account firewall. However, more time than specified might be needed for the allowlist to take into effect. -
After the deployment is complete, go to the portal and locate the provisioned resource group (
rg-ENVIRONMENT-NAME). Click on the resource group and copy the name of the function app that was created inside it. -
Run the following command, replacing the placeholder with the name of your app:
func azure functionapp list-functions <FUNCTION_APP_NAME> --show-keys
Expected output
SayHello - [activityTrigger] DurableFunctionsOrchestrationCSharp1 - [orchestrationTrigger] DurableFunctionsOrchestrationCSharp1_HttpStart - [httpTrigger] Invoke url: https://my-func-app.azurewebsites.net/api/durablefunctionsorchestrationcsharp1_httpstart -
Navigate to the
DurableFunctionsOrchestrationCSharp1_HttpStartURL to start a Hello Cities orchestration instance. Use the Durable Task Scheduler dashboard to check the three greeting activities and their results.
You can access the dashboard by going to https://dashboard.durabletask.io/ and registering a task hub endpoint or by following steps below to get the dashboard URL on Azure portal.
-
Navigate to the
rg-<YOUR_AZD_ENVIRONMENT_NAME>overview page on Azure portal. -
Browse orchestration state and history from within the TaskHub:
The durable task scheduler supports identity-based authentication only. This sample sets up the authentication through specifications in bicep files. If you're configuring identity-based access yourself, refer to documentation on Microsoft Learn.
Delete the resource group rg-ENVIRONMENT-NAME to deprovision all resources created:
az group delete --name rg-ENVIRONMENT-NAME-
Navigate to https://dashboard.durabletask.io and sign in using your Microsoft Entra ID account.
-
Once successfully authenticated, follow these steps to add the connection to the Durable Task Scheduler:
- Add your Subscription ID in the Subscription input field.
- Enter the Scheduler Resource Name in the Scheduler input field.
- Provide the Scheduler Endpoint in the Scheduler Endpoint input field. You can use the Azure CLI Durable Task Extension to retrieve the endpoint:
% az durabletask scheduler list -g "RESOURCE-GROUP-NAME"Output
[
{
"id": "/subscriptions/SUBSCRIPTION-ID/resourceGroups/RESOURCE-GROUP/providers/Microsoft.DurableTask/schedulers/SCHEDULER-NAME",
"location": "westus2",
"name": "SCHEDULER-NAME",
"properties": {
"endpoint": "https://SCHEDULER-NAME.westus2.durabletask.io",
"ipAllowlist": [
"0.0.0.0/0"
],
"provisioningState": "Succeeded",
"sku": {
"capacity": 1,
"name": "Dedicated",
"redundancyState": "None"
}
},
"resourceGroup": "RESOURCE-GROUP",
"systemData": {
"createdAt": "2025-01-14T19:32:34Z",
"createdBy": "email@microsoft.com",
"createdByType": "User",
"lastModifiedAt": "2025-01-14T19:32:34Z",
"lastModifiedBy": "email@microsoft.com",
"lastModifiedByType": "User"
},
"tags": {
"azd-env-name": "RESOURCE-GROUP-NAME"
}
}
]- Add the name of the TaskHub. Use the following CLI command to locate the TaskHub name
az durabletask taskhub list -s "SCHEDULER-NAME" -g "RESOURCE-GROUP"Output
[
{
"id": "/subscriptions/SUBSCRIPTION-IDresourceGroups/RESOURCE-GROUP/providers/Microsoft.DurableTask/schedulers/SCHEDULER-NAME/taskHubs/TASKHUB-NAME",
"name": "TASKHUB-NAME",
"properties": {
"dashboardUrl": "https://dashboard.durabletask.io/subscriptions/SUBSCRIPTION-ID/schedulers/SCHEDULER-NAME/taskhubs/TASKHUB-NAME?endpoint=https%3a%2f%2fSCHEDULER-NAME.westus2.durabletask.io",
"provisioningState": "Succeeded"
},
"resourceGroup": "RESOURCE-GROUP",
"systemData": {
"createdAt": "2025-01-14T19:49:11Z",
"createdBy": "email@microsoft.com",
"createdByType": "User",
"lastModifiedAt": "2025-01-14T19:49:11Z",
"lastModifiedBy": "email@microsoft.com",
"lastModifiedByType": "User"
}
}
]-
Once the connection has been successfully added, you will be able to navigate to the TaskHub Overview page, where you can see the status of the orchestrations within that TaskHub.
Learn more about:





