You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/data-explorer/managed-identities.md
+69-10Lines changed: 69 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,27 +6,49 @@ ms.author: itsagui
6
6
ms.reviewer: orspodek
7
7
ms.service: data-explorer
8
8
ms.topic: conceptual
9
-
ms.date: 01/06/2020
9
+
ms.date: 03/12/2020
10
10
---
11
11
12
12
# Configure managed identities for your Azure Data Explorer cluster
13
13
14
14
A [managed identity from Azure Active Directory](/azure/active-directory/managed-identities-azure-resources/overview) allows your cluster to easily access other AAD-protected resources such as Azure Key Vault. The identity is managed by the Azure platform and doesn't require you to provision or rotate any secrets. This article shows you how to create a managed identity for Azure Data Explorer clusters. Managed identity configuration is currently supported only to [enable customer-managed keys for your cluster](/azure/data-explorer/security#customer-managed-keys-with-azure-key-vault).
15
15
16
16
> [!Note]
17
-
> Managed identities for Azure Data Explorer won't behave as expected if your app is migrated across subscriptions or tenants. The app will need to obtain a new identity, which can be done by disabling and re-enabling the feature using [remove an identity](#remove-an-identity). Access policies of downstream resources will also need to be updated to use the new identity.
17
+
> Managed identities for Azure Data Explorer won't behave as expected if your app is migrated across subscriptions or tenants. The app will need to obtain a new identity, which can be done by [disabling](#remove-a-system-assigned-identity) and [re-enabling](#add-a-system-assigned-identity) the feature. Access policies of downstream resources will also need to be updated to use the new identity.
18
18
19
19
## Add a system-assigned identity
20
+
21
+
Assign a system-assigned identity that is tied to your cluster, and is deleted if your cluster is deleted. A cluster can only have one system-assigned identity. Creating a cluster with a system-assigned identity requires an additional property to be set on the cluster. The system-assigned identity is added using C#, ARM templates, or the Azure portal as detailed below.
20
22
21
-
Your cluster can be assigned a **system-assigned identity** that is tied to your cluster, and is deleted if your cluster is deleted. A cluster can only have one system-assigned identity. Creating a cluster with a system-assigned identity requires an additional property to be set on the cluster.
23
+
# [Azure portal](#tab/portal)
24
+
25
+
### Add a system-assigned identity using the Azure portal
26
+
27
+
1. Sign in to the [Azure portal](https://portal.azure.com/).
28
+
1.[Create an Azure Data Explorer cluster](/azure/data-explorer/create-cluster-database-portal#create-a-cluster)
29
+
1. Select **Settings** > **Identity** in left pane of portal.
30
+
1. In the **Identity** pane > **System assigned** tab:
31
+
1. Move the **Status** slider to **On**.
32
+
1. Select **Save**
33
+
1. In the pop-up window, select **Yes**
34
+
35
+

36
+
37
+
1. After a few minutes, the resulting screen shows **Object ID** and **Role assignments**.
To set up a managed identity using the Azure Data Explorer C# client, do the following:
45
+
#### Prerequisites
46
+
47
+
To set up a managed identity using the Azure Data Explorer C# client:
26
48
27
49
* Install the [Azure Data Explorer (Kusto) NuGet package](https://www.nuget.org/packages/Microsoft.Azure.Management.Kusto/).
28
50
* Install the [Microsoft.IdentityModel.Clients.ActiveDirectory NuGet package](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/) for authentication.
29
-
*To run the following example, [create an Azure AD application](/azure/active-directory/develop/howto-create-service-principal-portal) and service principal that can access resources. You can add role assignment at the subscription scope and get the required `Directory (tenant) ID`, `Application ID`, and `Client Secret`.
51
+
*[Create an Azure AD application](/azure/active-directory/develop/howto-create-service-principal-portal) and service principal that can access resources. You add role assignment at the subscription scope and get the required `Directory (tenant) ID`, `Application ID`, and `Client Secret`.
30
52
31
53
#### Create or update your cluster
32
54
@@ -47,7 +69,7 @@ To set up a managed identity using the Azure Data Explorer C# client, do the fol
47
69
{
48
70
SubscriptionId=subscriptionId
49
71
};
50
-
72
+
51
73
varresourceGroupName="testrg";
52
74
varclusterName="mykustocluster";
53
75
varlocation="Central US";
@@ -67,13 +89,15 @@ To set up a managed identity using the Azure Data Explorer C# client, do the fol
`PrincipalId` and `TenantId` arereplacedwithGUIDs. The `TenantId` propertyidentifiestheAADtenanttowhichtheidentitybelongs. The `PrincipalId` isauniqueidentifierforthecluster'snewidentity. WithinAAD, theserviceprincipalhasthesamenamethatyougavetoyourAppServiceorAzureFunctionsinstance.
98
+
`PrincipalId` and `TenantId` arereplacedwithGUIDs. The `TenantId` propertyidentifiestheAADtenanttowhichtheidentitybelongs. The `PrincipalId` isauniqueidentifierforthecluster'snewidentity. WithinAAD, theserviceprincipalhasthesamenamethatyougavetoyourAppServiceorAzureFunctionsinstance.
99
+
100
+
# [ARM template](#tab/arm)
77
101
78
102
### Add a system-assigned identity using an Azure Resource Manager template
79
103
@@ -120,16 +144,51 @@ When the cluster is created, it has the following additional properties:
120
144
121
145
`<TENANTID>` and `<PRINCIPALID>` are replaced with GUIDs. The `TenantId` property identifies the AAD tenant to which the identity belongs. The `PrincipalId` is a unique identifier for the cluster's new identity. Within AAD, the service principal has the same name that you gave to your App Service or Azure Functions instance.
122
146
123
-
## Remove an identity
147
+
---
148
+
149
+
## Remove a system-assigned identity
150
+
151
+
Removing a system-assigned identity will also delete it from AAD. System-assigned identities are also automatically removed from AAD when the cluster resource is deleted. A system-assigned identity can be removed by disabling the feature. The system-assigned identity is removed using C#, ARM templates, or the Azure portal as detailed below.
124
152
125
-
Removing a system-assigned identity will also delete it from AAD. System-assigned identities are also automatically removed from AAD when the cluster resource is deleted. A system-assigned identity can be removed by disabling the feature:
153
+
# [Azure portal](#tab/portal)
154
+
155
+
### Remove a system-assigned identity using the Azure portal
156
+
157
+
1. Sign in to the [Azure portal](https://portal.azure.com/).
158
+
1. Select **Settings** > **Identity** in left pane of portal.
159
+
1. In the **Identity** pane > **System assigned** tab:
160
+
1. Move the **Status** slider to **Off**.
161
+
1. Select **Save**
162
+
1. In the pop-up window, select **Yes** to disable the system-assigned identity. The **Identity** pane reverts to same condition as before the addition of the system-assigned identity.
0 commit comments