Skip to content

Commit d582ced

Browse files
committed
Fix script commands
1 parent 536833a commit d582ced

File tree

5 files changed

+33
-42
lines changed

5 files changed

+33
-42
lines changed

articles/iot-operations/connect-to-cloud/howto-configure-destination-data-explorer.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,7 @@ For the destination stage to connect to Azure Data Explorer, it needs access to
5454
5555
# [Managed identity](#tab/managedidentity)
5656
57-
To find the application ID of the managed identity and your tenant ID, run the following commands. Replace the placeholders with your cluster name and resource group:
58-
59-
```azurecli
60-
CLUSTER_NAME=<Your connected cluster name>
61-
RESOURCE_GROUP=<The resource group where your connected cluster is installed>
62-
EXTENSION_NAME=processor
63-
64-
OBJECT_ID=$(az k8s-extension show --name $EXTENSION_NAME --cluster-name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --cluster-type connected
65-
echo "App ID: " `az ad sp show --query appId --id $OBJECT_ID -o tsv`
66-
echo "Tenant ID: " `az account show --query tenantId -o tsv`
67-
```
68-
69-
Make a note of the `App ID` and `Tenant ID`, you need these values in the next step.
57+
[!INCLUDE [get-managed-identity](../includes/get-managed-identity.md)]
7058
7159
To add the managed identity to the database, navigate to the Azure Data Explorer portal and run the following query on your database. Replace the placeholders with the values you made a note of in the previous step:
7260

articles/iot-operations/connect-to-cloud/howto-configure-destination-fabric.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,25 +72,15 @@ For the destination stage to connect to Microsoft Fabric, it needs access to a s
7272
7373
# [Managed identity](#tab/managedidentity)
7474
75-
To find the application ID of the managed identity and your tenant ID, run the following commands. Replace the placeholders with your cluster name and resource group:
76-
77-
```azurecli
78-
CLUSTER_NAME=<Your connected cluster name>
79-
RESOURCE_GROUP=<The resource group where your connected cluster is installed>
80-
EXTENSION_NAME=processor
81-
82-
OBJECT_ID=$(az k8s-extension show --name $EXTENSION_NAME --cluster-name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --cluster-type connected
83-
echo "App ID: " `az ad sp show --query appId --id $OBJECT_ID -o tsv`
84-
echo "Tenant ID: " `az account show --query tenantId -o tsv`
85-
```
86-
87-
Make a note of the `App ID` and `Tenant ID`, you need these values in the next step.
75+
[!INCLUDE [get-managed-identity](../includes/get-managed-identity.md)]
8876
8977
To grant the service principal access to your Microsoft Fabric workspace:
9078
91-
1. In your workspace, select **Manage access**.
79+
1. In your workspace, select **Manage access**. Then select **+ Add people or groups**.
80+
81+
1. Search for your managed identity by typing _processor_ in the **Enter name or email** textbox. Check that the `App ID:` value matches the **App ID** you made a note of in the previous step.
9282
93-
1. Select **Add people or groups**, then paste the **App ID** from the previous step and grant at least **Contributor** access to it.
83+
1. Grant at least **Contributor** access to the processor app.
9484
9585
---
9686
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: include file
3+
description: include file
4+
author: dominicbetts
5+
ms.topic: include
6+
ms.date: 03/05/2024
7+
ms.author: dobett
8+
---
9+
10+
To find the application ID of the managed identity and your tenant ID, run the following commands. Replace the placeholders with your cluster name, resource group, and subscription ID:
11+
12+
```azurecli
13+
CLUSTER_NAME=<Your connected cluster name>
14+
RESOURCE_GROUP=<The resource group where your connected cluster is installed>
15+
SUBSCRIPTION=<The subscription where your connected cluster is installed>
16+
EXTENSION_NAME=processor
17+
18+
OBJECT_ID=$(az k8s-extension show --name $EXTENSION_NAME --cluster-name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --cluster-type connectedClusters --query identity.principalId -o tsv --subscription $SUBSCRIPTION)
19+
echo "App ID: " `az ad sp show --query appId --id $OBJECT_ID -o tsv`
20+
echo "Tenant ID: " `az account show --query tenantId -o tsv`
21+
```
22+
23+
Make a note of the `App ID` and `Tenant ID`, you need these values later.

articles/iot-operations/process-data/howto-configure-datasource-sql.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ To find the principal ID of the managed identity, run the following commands. Re
6565
```azurecli
6666
CLUSTER_NAME=<Your connected cluster name>
6767
RESOURCE_GROUP=<The resource group where your connected cluster is installed>
68+
SUBSCRIPTION=<The subscription where your connected cluster is installed>
6869
EXTENSION_NAME=processor
6970
70-
OBJECT_ID=$(az k8s-extension show --name $EXTENSION_NAME --cluster-name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --cluster-type connected>echo "Principal ID: " $OBJECT_ID
71+
OBJECT_ID=$(az k8s-extension show --name $EXTENSION_NAME --cluster-name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --cluster-type connectedClusters --query identity.principalId -o tsv --subscription $SUBSCRIPTION)
72+
echo "Principal ID: " $OBJECT_ID
7173
```
7274

7375
To grant access to the **Principal ID** in your SQL Server database, run the following command in the database:

articles/iot-operations/view-analyze-data/tutorial-anomaly-detection.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,7 @@ Complete the following tasks to prepare your environment.
4141

4242
Before you can write to Azure Data Explorer from a data pipeline, enable access for the managed identity associated with the data processor in your database. The advantage of using the managed identity instead of creating your own service principal is that you don't need to manage the lifecycle of the service principal. The managed identity is automatically created and managed by the data processor extension.
4343

44-
To find the application ID of the managed identity and your tenant ID, run the following commands. Replace the placeholders with your cluster name and resource group:
45-
46-
```azurecli
47-
CLUSTER_NAME=<Your connected cluster name>
48-
RESOURCE_GROUP=<The resource group where your connected cluster is installed>
49-
EXTENSION_NAME=processor
50-
51-
OBJECT_ID=$(az k8s-extension show --name $EXTENSION_NAME --cluster-name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --cluster-type connected
52-
echo "App ID: " `az ad sp show --query appId --id $OBJECT_ID -o tsv`
53-
echo "Tenant ID: " `az account show --query tenantId -o tsv`
54-
```
55-
56-
Make a note of the `App ID` and `Tenant ID`, you need these values in the next step.
44+
[!INCLUDE [get-managed-identity](../includes/get-managed-identity.md)]
5745

5846
To add the managed identity to the database, navigate to the Azure Data Explorer portal and run the following query on your database. Replace the placeholders with the values you made a note of in the previous step:
5947

0 commit comments

Comments
 (0)