|
1 | 1 | --- |
2 | 2 | title: AADSTS7000222 - BadRequest or InvalidClientSecret error |
3 | 3 | description: Learn how to troubleshoot the BadRequest or InvalidClientSecret error when you try to create or upgrade an Azure Kubernetes Service (AKS) cluster. |
| 4 | +ms.topic: article |
| 5 | +ms.date: 06/13/2024 |
4 | 6 | author: axelgMS |
5 | 7 | ms.author: axelg |
6 | | -ms.date: 12/19/2023 |
7 | | -editor: v-jsitser |
8 | | -ms.reviewer: v-leedennis |
9 | | -ms.service: azure-kubernetes-service |
10 | | -#Customer intent: As an Azure Kubernetes user, I want to troubleshoot the BadRequest or InvalidClientSecret error code so that I can successfully create or upgrade an Azure Kubernetes Service (AKS) cluster. |
11 | | -ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or nodepool) |
| 8 | +ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or nodepool), innovation-engine |
12 | 9 | --- |
| 10 | + |
13 | 11 | # AADSTS7000222 - BadRequest or InvalidClientSecret error |
14 | 12 |
|
15 | 13 | This article discusses how to identify and resolve the `AADSTS7000222` error (`BadRequest` or `InvalidClientSecret`) that occurs when you try to create or upgrade a Microsoft Azure Kubernetes Service (AKS) cluster. |
@@ -39,11 +37,11 @@ The issue that generates this service principal alert usually occurs for one of |
39 | 37 |
|
40 | 38 | #### Verify the cause |
41 | 39 |
|
42 | | -Run the following Azure CLI code to retrieve the service principal profile for your AKS cluster and [check the expiration date of the service principal](/azure/aks/update-credentials#check-the-expiration-date-of-your-service-principal): |
| 40 | +Use the following commands to retrieve the service principal profile for your AKS cluster and check the expiration date of the service principal. Make sure to set the appropriate variables for your AKS resource group and cluster name. |
43 | 41 |
|
44 | 42 | ```azurecli |
45 | | -SP_ID=$(az aks show --resource-group <rg-name> \ |
46 | | - --name <aks-cluster-name> \ |
| 43 | +SP_ID=$(az aks show --resource-group $RESOURCE_GROUP_NAME \ |
| 44 | + --name $AKS_CLUSTER_NAME \ |
47 | 45 | --query servicePrincipalProfile.clientId \ |
48 | 46 | --output tsv) |
49 | 47 | az ad app credential list --id "$SP_ID" |
@@ -72,4 +70,4 @@ Alternatively, you can verify that the service principal name and secret are cor |
72 | 70 |
|
73 | 71 | - [Use a service principal with Azure Kubernetes Service (AKS)](/azure/aks/kubernetes-service-principal) (especially the [Troubleshoot](/azure/aks/kubernetes-service-principal#troubleshoot) section) |
74 | 72 |
|
75 | | -[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)] |
| 73 | +[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)] |
0 commit comments