Skip to content

Commit 4ce5dc3

Browse files
authored
Merge pull request #7493 from mosbahmajed/workitem-80388
AB#1859: Update error-code-serviceprincipalvalidationclienterror.md
2 parents 4b22a39 + d192942 commit 4ce5dc3

1 file changed

Lines changed: 26 additions & 7 deletions

File tree

support/azure/azure-kubernetes/create-upgrade-delete/error-code-serviceprincipalvalidationclienterror.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
22
title: Troubleshoot the ServicePrincipalValidationClientError error code
33
description: Learn how to troubleshoot the ServicePrincipalValidationClientError error when you try to create and deploy an Azure Kubernetes Service (AKS) cluster.
4-
ms.date: 03/22/2022
5-
editor: v-jsitser
6-
ms.reviewer: rissing, chiragpa, erbookbi, v-leedennis
4+
ms.date: 10/23/2024
5+
ms.reviewer: rissing, chiragpa, erbookbi, momajed, v-leedennis, v-weizhu
76
ms.service: azure-kubernetes-service
87
#Customer intent: As an Azure Kubernetes user, I want to troubleshoot the ServicePrincipalValidationClientError error code so that I can successfully create and deploy an Azure Kubernetes Service (AKS) cluster.
98
ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or nodepool)
@@ -52,14 +51,28 @@ The secret that's provided for the highlighted service principal isn't valid.
5251

5352
## Solution 1: Reset the service principal secret
5453

55-
Reset the secret that's used for the service principal by running the [az ad sp credential reset](/cli/azure/ad/sp/credential#az-ad-sp-credential-reset) command:
54+
To resolve this issue, reset the service principal secret by using one of the following methods:
55+
56+
- Reset the service principal's credential by running the [az ad sp credential reset](/cli/azure/ad/sp/credential#az-ad-sp-credential-reset) command:
57+
58+
```azurecli-interactive
59+
az ad sp credential reset --name "01234567-89ab-cdef-0123-456789abcdef" --query password --output tsv
60+
```
61+
62+
- Specify the expiration date by running the following command:
63+
64+
```azurecli-interactive
65+
az ad sp credential reset --name <service-principal-name> --credential-description "New secret for AKS" --years 1
66+
```
67+
68+
The preceding command resets the secret and displays it as output. Then, you can specify the new secret when you try to create the new cluster again.
69+
70+
For failed operations in an existing cluster, ensure that you update your AKS cluster with the new secret:
5671

5772
```azurecli-interactive
58-
az ad sp credential reset --name "01234567-89ab-cdef-0123-456789abcdef" --query password --output tsv
73+
az aks update-credentials --resource-group <resource-group> --name <aks-cluster> --reset-service-principal --client-secret <new-client-secret>
5974
```
6075

61-
This command resets the secret, and displays it as output. Then, you can specify the new secret when you try again to create the new cluster.
62-
6376
## Solution 2: Create a new service principal
6477

6578
You can create a new service principal and get the secret that's associated with it by running the [az ad sp create-for-rbac](/cli/azure/ad/sp#az-ad-sp-create-for-rbac) command:
@@ -81,6 +94,12 @@ The output of the command should resemble the following JSON string:
8194

8295
Note the `appId` and `password` values that are generated. After you get these values, you can rerun the cluster creation command for the new service principal and secret.
8396

97+
To update your AKS cluster with the new service principal's credential, run the following command:
98+
99+
```azurecli-interactive
100+
az aks update-credentials --resource-group <resource-group> --name <aks-cluster> --service-principal <new-client-id> --client-secret <new-client-secret>
101+
```
102+
84103
## More information
85104

86105
- [General troubleshooting of AKS cluster creation issues](troubleshoot-aks-cluster-creation-issues.md)

0 commit comments

Comments
 (0)