Skip to content

Commit 41029ee

Browse files
committed
breaking out into other how-tos
Signed-off-by: Hannah Hunter <[email protected]>
1 parent 337a3af commit 41029ee

File tree

4 files changed

+139
-239
lines changed

4 files changed

+139
-239
lines changed

articles/azure-functions/durable/durable-task-scheduler/develop-with-durable-task-scheduler.md

Lines changed: 2 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -264,174 +264,9 @@ You can see all the task hubs created in a scheduler on the **Overview** of the
264264

265265
Durable Task Scheduler **only** supports either *user-assigned* or *system-assigned* managed identity authentication. **User-assigned identities are recommended,** as they aren't tied to the lifecycle of the app and can be reused after the app is deprovisioned.
266266
267-
The following are the Durable Task Scheduler related roles you can grant to an identity:
267+
If you haven't already, [configure managed identity for your Durable Functions app](./durable-task-scheduler-identity.md).
268268

269-
- **Durable Task Data Contributor**: Role for all data access operations. This role is a superset of all other roles.
270-
- **Durable Task Worker**: Role used by worker applications to interact with the Durable Task Scheduler. Assign this role if your app is used *only* for processing orchestrations, activities, and entities.
271-
- **Durable Task Data Reader**: Role to read all Durable Task Scheduler data. Assign this role if you only need a list of orchestrations and entities payloads.
272-
273-
> [!NOTE]
274-
> Most Durable Functions apps would require the Durable Task Data Contributor role.
275-
276-
The following sections demonstrate how to grant permissions to an identity resource and configure your Durable Functions app to use the identity for access to schedulers and task hubs.
277-
278-
### Assign RBAC (role-based access control) to managed identity resource
279-
280-
::: zone pivot="az-cli"
281-
282-
1. Create a user-assigned managed identity
283-
284-
```azurecli
285-
az identity create -g RESOURCE_GROUP_NAME -n IDENTITY_NAME
286-
```
287-
288-
1. Set the assignee to identity resource created
289-
290-
```azurecli
291-
assignee=$(az identity show --name IDENTITY_NAME --resource-group RESOURCE_GROUP_NAME --query 'clientId' --output tsv)
292-
```
293-
294-
1. Set the scope. Granting access on the scheduler scope gives access to *all* task hubs in that scheduler.
295-
296-
**Task Hub**
297-
298-
```bash
299-
scope="/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.DurableTask/schedulers/SCHEDULER_NAME/taskHubs/TASKHUB_NAME"
300-
```
301-
302-
**Scheduler**
303-
304-
```bash
305-
scope="/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.DurableTask/schedulers/SCHEDULER_NAME"
306-
```
307-
308-
1. Grant access. Run the following command to create the role assignment and grant access.
309-
310-
```azurecli
311-
az role assignment create \
312-
--assignee "$assignee" \
313-
--role "Durable Task Data Contributor" \
314-
--scope "$scope"
315-
```
316-
317-
*Expected output*
318-
319-
The following output example shows a developer identity assigned with the Durable Task Data Contributor role on the *scheduler* level:
320-
321-
```json
322-
{
323-
"condition": null,
324-
"conditionVersion": null,
325-
"createdBy": "YOUR_DEVELOPER_CREDENTIAL_ID",
326-
"createdOn": "2024-12-20T01:36:45.022356+00:00",
327-
"delegatedManagedIdentityResourceId": null,
328-
"description": null,
329-
"id": "/subscriptions/YOUR_SUBSCRIPTION_ID/resourceGroups/YOUR_RESOURCE_GROUP/providers/Microsoft.DurableTask/schedulers/YOUR_DTS_NAME/providers/Microsoft.Authorization/roleAssignments/ROLE_ASSIGNMENT_ID",
330-
"name": "ROLE_ASSIGNMENT_ID",
331-
"principalId": "YOUR_DEVELOPER_CREDENTIAL_ID",
332-
"principalName": "YOUR_EMAIL",
333-
"principalType": "User",
334-
"resourceGroup": "YOUR_RESOURCE_GROUP",
335-
"roleDefinitionId": "/subscriptions/YOUR_SUBSCRIPTION/providers/Microsoft.Authorization/roleDefinitions/ROLE_DEFINITION_ID",
336-
"roleDefinitionName": "Durable Task Data Contributor",
337-
"scope": "/subscriptions/YOUR_SUBSCRIPTION/resourceGroups/YOUR_RESOURCE_GROUP/providers/Microsoft.DurableTask/schedulers/YOUR_DTS_NAME",
338-
"type": "Microsoft.Authorization/roleAssignments",
339-
"updatedBy": "YOUR_DEVELOPER_CREDENTIAL_ID",
340-
"updatedOn": "2024-12-20T01:36:45.022356+00:00"
341-
}
342-
```
343-
344-
::: zone-end
345-
346-
::: zone pivot="az-portal"
347-
348-
[!INCLUDE [assign-role-based-access-control-portal](./includes/assign-role-based-access-control-portal.md)]
349-
350-
::: zone-end
351-
352-
### Assign managed identity to your app
353-
354-
Now that the identity has the required RBAC to access Durable Task Scheduler, you need to assign it to your function app.
355-
356-
::: zone pivot="az-cli"
357-
358-
1. Get resource ID of manage identity.
359-
```azurecli
360-
resource_id=$(az resource show --resource-group RESOURCE_GROUP --name MANAGED_IDENTITY_NAME --resource-type Microsoft.ManagedIdentity/userAssignedIdentities --query id --output tsv)
361-
```
362-
363-
1. Assign the identity to app.
364-
```azurecli
365-
az functionapp identity assign --resource-group RESOURCE_GROUP_NAME --name FUNCTION_APP_NAME --identities "$resource_id"
366-
```
367-
368-
::: zone-end
369-
370-
::: zone pivot="az-portal"
371-
372-
1. From your app in the portal, select **Settings** > **Identity**.
373-
374-
1. Click the **User assigned** tab.
375-
376-
1. Click **+ Add**, then pick the identity created in the last section. Click the **Add** button.
377-
378-
:::image type="content" source="media/configure-durable-task-scheduler/assign-identity.png" alt-text="Screenshot of adding the user-assigned managed identity to your app in the portal.":::
379-
380-
::: zone-end
381-
382-
### Add environment variables to app
383-
384-
Add these two environment variables to app setting:
385-
- `TASKHUB_NAME`: name of task hub
386-
- `DURABLE_TASK_SCHEDULER_CONNECTION_STRING`: the format of the string is `"Endpoint={scheduler point};Authentication=ManagedIdentity;ClientID={client id}"`, where `Endpoint` is the scheduler endpoint and `client id` is the identity's client ID.
387-
388-
::: zone pivot="az-cli"
389-
390-
1. Get the required information for the Durable Task Scheduler connection string.
391-
392-
To get the scheduler endpoint.
393-
```azurecli
394-
az durabletask scheduler show --resource-group RESOURCE_GROUP_NAME --name DTS_NAME --query 'properties.endpoint' --output tsv
395-
```
396-
397-
To get the client ID of managed identity.
398-
```azurecli
399-
az identity show --name MANAGED_IDENTITY_NAME --resource-group RESOURCE_GROUP_NAME --query 'clientId' --output tsv
400-
```
401-
402-
1. Use the following command to add environment variable for the scheduler connection string to app.
403-
```azurecli
404-
az functionapp config appsettings set --resource-group RESOURCE_GROUP_NAME --name FUNCTION_APP_NAME --settings KEY_NAME=KEY_VALUE
405-
```
406-
407-
1. Repeat previous step to add environment variable for task hub name.
408-
409-
::: zone-end
410-
411-
::: zone pivot="az-portal"
412-
413-
1. Get the required information for the Durable Task Scheduler connection string.
414-
415-
To get your scheduler endpoint, navigate to the **Overview** tab of your scheduler resource and find "Endpoint" in the top *Essentials* section.
416-
417-
To get your managed identity client ID, navigate to the **Overview** tab of your resource and find "Client ID" in the top *Essentials* section.
418-
419-
1. Navigate to your app on the portal.
420-
421-
1. In the left menu, click **Settings** > **Environment variables**.
422-
423-
1. Add environment variable for Durable Task Scheduler connection string.
424-
425-
1. Add environment variable for task hub name.
426-
427-
1. Click **Apply** then **Confirm** to add the variables.
428-
429-
::: zone-end
430-
431-
> [!NOTE]
432-
> If you use system-assigned identity, your connection string would *not* need the client ID of the identity resource: `"Endpoint={scheduler endpoint};Authentication=ManagedIdentity"`.
433-
434-
## Accessing Durable Task Scheduler dashboard
269+
## Accessing the Durable Task Scheduler dashboard
435270

436271
Assign the required role to your *developer identity (email)* to gain access to the [Durable Task Scheduler dashboard](./durable-task-scheduler-dashboard.md).
437272

articles/azure-functions/durable/durable-task-scheduler/durable-task-scheduler-dashboard.md

Lines changed: 97 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,107 @@
11
---
22
title: Debug and manage orchestrations using the Azure Functions Durable Task Scheduler dashboard (preview)
33
description: Learn how to debug and manage your orchestrations using the Azure Functions Durable Task Scheduler.
4-
ms.topic: conceptual
5-
ms.date: 03/17/2025
4+
ms.topic: how-to
5+
ms.date: 05/05/2025
6+
zone_pivot_groups: dts-devexp
67
---
78

89
# Debug and manage orchestrations using the Azure Functions Durable Task Scheduler dashboard (preview)
910

10-
Observe, manage, and debug your task hub or scheduler's orchestrations effectively using the Durable Task Scheduler dashboard. The dashboard is available when you run the [Durable Task Scheduler emulator](./durable-task-scheduler.md#emulator-for-local-development) locally or create a scheduler resource on Azure.
11-
- **Running locally** doesn't require authentication.
12-
- **Creating a scheduler resource on Azure** requires that you [assign the *Durable Task Data Contributor* role to your identity](./develop-with-durable-task-scheduler.md#accessing-durable-task-scheduler-dashboard). You can then access the dashboard via either:
13-
- The task hub's dashboard endpoint URL in the Azure portal
14-
- Navigate to `https://dashboard.durabletask.io/` combined with your task hub endpoint.
11+
Observe, manage, and debug your task hub or scheduler's orchestrations using the Durable Task Scheduler dashboard. The dashboard is available when you run the [Durable Task Scheduler emulator](./durable-task-scheduler.md#emulator-for-local-development) locally or create a scheduler resource on Azure.
12+
13+
Running the emulator locally doesn't require authentication.
14+
15+
Creating a scheduler resource on Azure requires [assigning the *Durable Task Data Contributor* role to your identity](./durable-task-scheduler-identity.md). You can then access the dashboard via either:
16+
- The task hub's dashboard endpoint URL in the Azure portal
17+
- Navigate to `https://dashboard.durabletask.io/` combined with your task hub endpoint.
18+
19+
In this article, you learn how to:
20+
21+
> [!div class="checklist"]
22+
>
23+
> - Assign one of the Durable Task roles to your developer identity.
24+
> - Access the Durable Task Scheduler dashboard.
25+
> - View orchestration status and history via the Durable Task Scheduler dashboard.
26+
27+
## Prerequisites
28+
29+
Before you begin:
30+
31+
- [Install the latest Azure CLI](/cli/azure/install-azure-cli)
32+
- [Create a scheduler and task hub resource](./develop-with-durable-task-scheduler.md)
33+
- [Configure managed identity for your Durable Task Scheduler resource](./durable-task-scheduler-identity.md)
34+
35+
## Access the Durable Task Scheduler dashboard
36+
37+
Assign the required role to your *developer identity (email)* to gain access to the [Durable Task Scheduler dashboard](./durable-task-scheduler-dashboard.md).
38+
39+
::: zone pivot="az-cli"
40+
41+
1. Set the assignee to your developer identity.
42+
43+
```azurecli
44+
assignee=$(az ad user show --id "[email protected]" --query "id" --output tsv)
45+
```
46+
47+
1. Set the scope. Granting access on the scheduler scope gives access to *all* task hubs in that scheduler.
48+
49+
**Task Hub**
50+
51+
```bash
52+
scope="/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP/providers/Microsoft.DurableTask/schedulers/SCHEDULER_NAME/taskHubs/TASK_HUB_NAME"
53+
```
54+
55+
**Scheduler**
56+
```bash
57+
scope="/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP/providers/Microsoft.DurableTask/schedulers/SCHEDULER_NAME"
58+
```
59+
60+
1. Grant access. Run the following command to create the role assignment and grant access.
61+
62+
```azurecli
63+
az role assignment create \
64+
--assignee "$assignee" \
65+
--role "Durable Task Data Contributor" \
66+
--scope "$scope"
67+
```
68+
69+
*Expected output*
70+
71+
The following output example shows a developer identity assigned with the Durable Task Data Contributor role on the *scheduler* level:
72+
73+
```json
74+
{
75+
"condition": null,
76+
"conditionVersion": null,
77+
"createdBy": "YOUR_DEVELOPER_CREDENTIAL_ID",
78+
"createdOn": "2024-12-20T01:36:45.022356+00:00",
79+
"delegatedManagedIdentityResourceId": null,
80+
"description": null,
81+
"id": "/subscriptions/YOUR_SUBSCRIPTION_ID/resourceGroups/YOUR_RESOURCE_GROUP/providers/Microsoft.DurableTask/schedulers/YOUR_DTS_NAME/providers/Microsoft.Authorization/roleAssignments/ROLE_ASSIGNMENT_ID",
82+
"name": "ROLE_ASSIGNMENT_ID",
83+
"principalId": "YOUR_DEVELOPER_CREDENTIAL_ID",
84+
"principalName": "YOUR_EMAIL",
85+
"principalType": "User",
86+
"resourceGroup": "YOUR_RESOURCE_GROUP",
87+
"roleDefinitionId": "/subscriptions/YOUR_SUBSCRIPTION/providers/Microsoft.Authorization/roleDefinitions/ROLE_DEFINITION_ID",
88+
"roleDefinitionName": "Durable Task Data Contributor",
89+
"scope": "/subscriptions/YOUR_SUBSCRIPTION/resourceGroups/YOUR_RESOURCE_GROUP/providers/Microsoft.DurableTask/schedulers/YOUR_DTS_NAME",
90+
"type": "Microsoft.Authorization/roleAssignments",
91+
"updatedBy": "YOUR_DEVELOPER_CREDENTIAL_ID",
92+
"updatedOn": "2024-12-20T01:36:45.022356+00:00"
93+
}
94+
```
95+
96+
1. After granting access, go to `https://dashboard.durabletask.io/` and fill out the required information about your scheduler and task hub to see the dashboard.
97+
98+
::: zone-end
99+
100+
::: zone pivot="az-portal"
101+
102+
[!INCLUDE [assign-dev-identity-role-based-access-control-portal](./includes/assign-dev-identity-role-based-access-control-portal.md)]
103+
104+
::: zone-end
15105
16106
## Monitor orchestration progress and execution history
17107

0 commit comments

Comments
 (0)