Skip to content

Commit 0b3f131

Browse files
authored
Merge pull request #199194 from shashankbarsin/main
Enable custom location using service principal
2 parents 8f9f731 + 186adbf commit 0b3f131

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

articles/azure-arc/kubernetes/custom-locations.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,21 @@ If you are logged into Azure CLI as an Azure AD user, to enable this feature on
7070
az connectedk8s enable-features -n <clusterName> -g <resourceGroupName> --features cluster-connect custom-locations
7171
```
7272

73-
If you are logged into Azure CLI using a service principal, to enable this feature on your cluster, execute the following steps:
73+
If you run the above command while being logged into Azure CLI using a service principal, you may observe the following warning:
7474

75-
1. Fetch the Object ID of the Azure AD application used by Azure Arc service:
75+
```console
76+
Unable to fetch oid of 'custom-locations' app. Proceeding without enabling the feature. Insufficient privileges to complete the operation.
77+
```
78+
79+
This is because a service principal doesn't have permissions to get information of the application used by Azure Arc service. To avoid this error, execute the following steps:
80+
81+
1. Login into Azure CLI using your user account. Fetch the Object ID of the Azure AD application used by Azure Arc service:
7682

7783
```azurecli
78-
az ad sp show --id 'bc313c14-388c-4e7d-a58e-70017303ee3b' --query objectId -o tsv
84+
az ad sp show --id bc313c14-388c-4e7d-a58e-70017303ee3b --query objectId -o tsv
7985
```
8086
81-
1. Use the `<objectId>` value from above step to enable custom locations feature on the cluster:
87+
1. Login into Azure CLI using the service principal. Use the `<objectId>` value from above step to enable custom locations feature on the cluster:
8288
8389
```azurecli
8490
az connectedk8s enable-features -n <cluster-name> -g <resource-group-name> --custom-locations-oid <objectId> --features cluster-connect custom-locations

0 commit comments

Comments
 (0)