Skip to content

Commit b801e45

Browse files
author
naman-msft
committed
testing more docs
1 parent e8abd9e commit b801e45

File tree

18 files changed

+2484
-96
lines changed

18 files changed

+2484
-96
lines changed

tools/ada.py

Lines changed: 118 additions & 63 deletions
Large diffs are not rendered by default.

tools/log.json

Lines changed: 89 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"info": {
33
"Creation Date": "2025-05-06 13:27:28",
4-
"Last Modified Date": "2025-05-13 21:23:55",
5-
"Total Operations": 15,
6-
"Success Rate": 0.13,
4+
"Last Modified Date": "2025-05-20 22:53:58",
5+
"Total Operations": 22,
6+
"Success Rate": 0.32,
77
"Operation Summary": {
88
"doc_creation": 0,
9-
"doc_conversion": 15,
9+
"doc_conversion": 22,
1010
"script_documentation": 0,
1111
"security_analysis": 0,
1212
"pii_redaction": 0,
1313
"seo_optimization": 0
1414
},
15-
"Total Execution Time (in seconds)": 23618
15+
"Total Execution Time (in seconds)": 23751
1616
},
1717
"doc_conversion": [
1818
{
@@ -194,6 +194,90 @@
194194
"Result": "Failure",
195195
"Project Folder": "untested/azure_kubernetes_service_aks_external",
196196
"User Intent": "User intends to deploy external or internal ingress gateways for the Istio service mesh add-on in an Azure Kubernetes Service (AKS) cluster."
197+
},
198+
{
199+
"Timestamp": "2025-05-19 03:34:12",
200+
"Type": "file",
201+
"Input": "untested/create_a_managed_or_user_assigned_nat/create_a_managed_or_user_assigned_nat.md",
202+
"Output": "untested/create_a_managed_or_user_assigned_nat/attempt_1_failure.md",
203+
"Attempt Number": 1,
204+
"Errors Encountered": "time=2025-05-19T03:34:12-07:00 level=error msg=Error testing scenario: failed to execute code block 0 on step 0.\nError: command exited with 'exit status 3' and the message 'WARNING: The behavior of this command has been altered by the following extension: aks-preview\nERROR: (ResourceGroupNotFound) Resource group 'myResourceGroupcefc72' could not be found.\nCode: ResourceGroupNotFound\nMessage: Resource group 'myResourceGroupcefc72' could not be found.\n'\nStdErr: WARNING: The behavior of this command has been altered by the following extension: aks-preview\nERROR: (ResourceGroupNotFound) Resource group 'myResourceGroupcefc72' could not be found.\nCode: ResourceGroupNotFound\nMessage: Resource group 'myResourceGroupcefc72' could not be found.",
205+
"Execution Time (in seconds)": 27,
206+
"Result": "Failure",
207+
"Project Folder": "untested/create_a_managed_or_user_assigned_nat",
208+
"User Intent": "User intends to set up an Azure Kubernetes Service (AKS) cluster with either a managed or user-assigned NAT gateway for outbound traffic management."
209+
},
210+
{
211+
"Timestamp": "2025-05-19 03:34:37",
212+
"Type": "file",
213+
"Input": "untested/create_a_managed_or_user_assigned_nat/create_a_managed_or_user_assigned_nat.md",
214+
"Output": "untested/create_a_managed_or_user_assigned_nat/attempt_2_success.md",
215+
"Attempt Number": 2,
216+
"Errors Encountered": "",
217+
"Execution Time (in seconds)": 26,
218+
"Result": "Success",
219+
"Project Folder": "untested/create_a_managed_or_user_assigned_nat",
220+
"User Intent": "User intends to set up an Azure Kubernetes Service (AKS) cluster with either a managed or user-assigned NAT gateway for outbound traffic management."
221+
},
222+
{
223+
"Timestamp": "2025-05-19 03:51:58",
224+
"Type": "file",
225+
"Input": "untested/delete_an_azure_kubernetes_service_ak/delete_an_azure_kubernetes_service_ak.md",
226+
"Output": "untested/delete_an_azure_kubernetes_service_ak/attempt_1_success.md",
227+
"Attempt Number": 1,
228+
"Errors Encountered": "",
229+
"Execution Time (in seconds)": 10,
230+
"Result": "Success",
231+
"Project Folder": "untested/delete_an_azure_kubernetes_service_ak",
232+
"User Intent": "User intends to delete an Azure Kubernetes Service (AKS) cluster."
233+
},
234+
{
235+
"Timestamp": "2025-05-19 05:14:36",
236+
"Type": "file",
237+
"Input": "untested/use_labels_in_an_azure_kubernetes_ser/use_labels_in_an_azure_kubernetes_ser.md",
238+
"Output": "untested/use_labels_in_an_azure_kubernetes_ser/attempt_1_failure.md",
239+
"Attempt Number": 1,
240+
"Errors Encountered": "time=2025-05-19T05:14:36-07:00 level=error msg=Error testing scenario: failed to execute code block 0 on step 0.\nError: command exited with 'exit status 2' and the message 'ERROR: argument --resource-group/-g: expected one argument\n\nExamples from AI knowledge base:\naz aks get-credentials --name MyManagedCluster --overwrite-existing --resource-group MyResourceGroup\nGet access credentials for a managed Kubernetes cluster. (autogenerated)\n\naz aks get-credentials --admin --name MyManagedCluster --resource-group MyResourceGroup\nGet access credentials for a managed Kubernetes cluster. (autogenerated)\n\naz account set --subscription mysubscription\nSet a subscription to be the current active subscription. (autogenerated)\n\nhttps://docs.microsoft.com/en-US/cli/azure/aks#az_aks_get_credentials\nRead more about the command in reference docs\n'\nStdErr: ERROR: argument --resource-group/-g: expected one argument\n\nExamples from AI knowledge base:\naz aks get-credentials --name MyManagedCluster --overwrite-existing --resource-group MyResourceGroup\nGet access credentials for a managed Kubernetes cluster. (autogenerated)\n\naz aks get-credentials --admin --name MyManagedCluster --resource-group MyResourceGroup\nGet access credentials for a managed Kubernetes cluster. (autogenerated)\n\naz account set --subscription mysubscription\nSet a subscription to be the current active subscription. (autogenerated)\n\nhttps://docs.microsoft.com/en-US/cli/azure/aks#az_aks_get_credentials\nRead more about the command in reference docs",
241+
"Execution Time (in seconds)": 23,
242+
"Result": "Failure",
243+
"Project Folder": "untested/use_labels_in_an_azure_kubernetes_ser",
244+
"User Intent": "User intends to learn how to use labels in an Azure Kubernetes Service (AKS) cluster to set scheduling rules for nodes."
245+
},
246+
{
247+
"Timestamp": "2025-05-19 05:14:50",
248+
"Type": "file",
249+
"Input": "untested/use_labels_in_an_azure_kubernetes_ser/use_labels_in_an_azure_kubernetes_ser.md",
250+
"Output": "untested/use_labels_in_an_azure_kubernetes_ser/attempt_2_success.md",
251+
"Attempt Number": 2,
252+
"Errors Encountered": "",
253+
"Execution Time (in seconds)": 14,
254+
"Result": "Success",
255+
"Project Folder": "untested/use_labels_in_an_azure_kubernetes_ser",
256+
"User Intent": "User intends to learn how to use labels in an Azure Kubernetes Service (AKS) cluster to set scheduling rules for nodes."
257+
},
258+
{
259+
"Timestamp": "2025-05-19 05:43:34",
260+
"Type": "file",
261+
"Input": "untested/azure_kubernetes_service_aks_free_sta/azure_kubernetes_service_aks_free_sta.md",
262+
"Output": "untested/azure_kubernetes_service_aks_free_sta/attempt_1_success.md",
263+
"Attempt Number": 1,
264+
"Errors Encountered": "",
265+
"Execution Time (in seconds)": 16,
266+
"Result": "Success",
267+
"Project Folder": "untested/azure_kubernetes_service_aks_free_sta",
268+
"User Intent": "User intends to compare and understand the features, deployment scenarios, and recommendations for the Free, Standard, and Premium pricing tiers of Azure Kubernetes Service (AKS) cluster management."
269+
},
270+
{
271+
"Timestamp": "2025-05-20 22:53:43",
272+
"Type": "file",
273+
"Input": "untested/azure_kubernetes_service_aks_managed_/azure_kubernetes_service_aks_managed_.md",
274+
"Output": "untested/azure_kubernetes_service_aks_managed_/attempt_1_success.md",
275+
"Attempt Number": 1,
276+
"Errors Encountered": "",
277+
"Execution Time (in seconds)": 17,
278+
"Result": "Success",
279+
"Project Folder": "untested/azure_kubernetes_service_aks_managed_",
280+
"User Intent": "User intends to deploy and configure a managed NGINX ingress controller on Azure Kubernetes Service (AKS) using the application routing add-on."
197281
}
198282
]
199283
}

tools/untested/aadsts7000222_badrequest_or_invalidcl/aadsts7000222_badrequest_or_invalidcl.md renamed to tools/success/aadsts7000222_badrequest_or_invalidcl/aadsts7000222_badrequest_or_invalidcl.md

File renamed without changes.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: AADSTS7000222 - BadRequest or InvalidClientSecret error
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
6+
author: axelgMS
7+
ms.author: axelg
8+
ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or nodepool), innovation-engine
9+
---
10+
11+
# AADSTS7000222 - BadRequest or InvalidClientSecret error
12+
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.
14+
15+
## Prerequisites
16+
17+
- [Azure CLI](/cli/azure/install-azure-cli)
18+
19+
## Symptoms
20+
21+
When you try to create or upgrade an AKS cluster, you receive one of the following error messages.
22+
23+
| Error code | Message |
24+
|--|--|
25+
| `BadRequest` | **The credentials in ServicePrincipalProfile were invalid.** Please see <https://aka.ms/aks-sp-help> for more details. (Details: adal: Refresh request failed. Status Code = '401'. Response body: {"error": "invalid_client", "error_description": "**AADSTS7000222: The provided client secret keys for app '\<application-id>' are expired.** Visit the Azure portal to create new keys for your app: <https://aka.ms/NewClientSecret>, or consider using certificate credentials for added security: <https://aka.ms/certCreds>." |
26+
| `InvalidClientSecret` | **Customer auth is not valid for tenant: \<tenant-id>**: adal: Refresh request failed. Status Code = '401'. Response body: {"error": "invalid_client", "error_description": "**AADSTS7000222: The provided client secret keys for app '\<application-id>' are expired.** Visit the Azure portal to create new keys for your app: <https://aka.ms/NewClientSecret>, or consider using certificate credentials for added security: <https://aka.ms/certCreds>." |
27+
28+
## Cause
29+
30+
The issue that generates this service principal alert usually occurs for one of the following reasons:
31+
32+
- The client secret expired.
33+
34+
- Incorrect credentials were provided.
35+
36+
- The service principal doesn't exist within the Microsoft Entra ID tenant of the subscription.
37+
38+
#### Verify the cause
39+
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.
41+
42+
```azurecli
43+
SP_ID=$(az aks show --resource-group RESOURCE_GROUP_NAME \
44+
--name AKS_CLUSTER_NAME \
45+
--query servicePrincipalProfile.clientId \
46+
--output tsv)
47+
az ad app credential list --id "$SP_ID"
48+
```
49+
50+
Alternatively, you can verify that the service principal name and secret are correct and aren't expired. To do this, follow these steps:
51+
52+
1. In the [Azure portal](https://portal.azure.com), search for and select **Microsoft Entra ID**.
53+
54+
1. In the navigation pane of Microsoft Entra ID, select **App registrations**.
55+
56+
1. On the **Owned applications** tab, select the affected application.
57+
58+
1. Find the service principal name and secret information, and verify that the information is correct and current.
59+
60+
## Solution
61+
62+
1. In the [Update or rotate the credentials for an AKS cluster](/azure/aks/update-credentials) article, follow the instructions in one of the following article sections, as appropriate:
63+
64+
- [Reset the existing service principal credentials](/azure/aks/update-credentials#reset-the-existing-service-principal-credentials)
65+
- [Create a new service principal](/azure/aks/update-credentials#create-a-new-service-principal)
66+
67+
1. Using your new service principal credentials, follow the instructions in the [Update AKS cluster with service principal credentials](/azure/aks/update-credentials#update-aks-cluster-with-service-principal-credentials) section of that article.
68+
69+
## More information
70+
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)
72+
73+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

0 commit comments

Comments
 (0)