Skip to content

Commit 584c8ab

Browse files
Merge pull request #311797 from dlepow/amrauth
[AMR] Connection troubleshoot - CLI
2 parents 75fff9c + b1b2ad2 commit 584c8ab

2 files changed

Lines changed: 59 additions & 6 deletions

File tree

articles/redis/entra-for-authentication.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Use Microsoft Entra for cache authentication with Azure Managed Redis
33
description: Learn how to use Microsoft Entra with Azure Managed Redis.
4-
ms.date: 11/05/2025
4+
ms.date: 02/12/2026
55
ms.topic: conceptual
66
ms.custom:
77
- references_regions
@@ -66,13 +66,37 @@ If you have used access keys in the past for authentication, you need to update
6666

6767
## Troubleshooting Microsoft Entra ID and your cache
6868

69-
If your application fails to access the Azure Managed Redis instance through Microsoft Entra ID, use this PowerShell script:
69+
If you encounter authentication issues with Microsoft Entra ID on your Azure Managed Redis instance, you can use the Azure CLI to test connectivity or validate your tokens using a PowerShell script.
7070

71-
[EntraTokenValidation](https://github.com/AzureManagedRedis/DiagnosticTools/tree/main/EntraTokenValidation)
71+
### Test connectivity with Azure CLI
72+
73+
You can use the Azure CLI to quickly test if you can connect to your Redis cluster. The [az redisenterprise test-connection](/cli/azure/redisenterprise#az_redisenterprise_test_connection) command is helpful for debugging connection issues and verifies end-to-end connectivity by sending a `ping` command.
74+
75+
For prerequisites to use the Azure CLI with Azure Managed Redis, see [Manage an Azure Managed Redis cache using the Azure CLI](scripts/create-manage-cache.md).
76+
77+
78+
To test connection with Microsoft Entra ID authentication (the default), run the following command:
79+
80+
```azurecli
81+
az redisenterprise test-connection --name <cache-name> --resource-group <resource-group-name>
82+
```
7283

73-
Use this PowerShell script to validate Microsoft Entra ID tokens for Azure Managed Redis Cache resources. The script validates tokens and verifies access policies to help you diagnose authentication issues.
84+
Or explicitly specify Entra authentication:
85+
86+
```azurecli
87+
az redisenterprise test-connection --name <cache-name> --resource-group <resource-group-name> --auth entra
88+
```
89+
90+
> [!NOTE]
91+
> This command uses the credential established through `az login`, which supports user accounts, managed identities, or service principals.
92+
93+
### Validate Microsoft Entra tokens
94+
95+
If your application fails to access the Azure Managed Redis instance through Microsoft Entra ID, you can also use the following PowerShell script:
96+
97+
[EntraTokenValidation](https://github.com/AzureManagedRedis/DiagnosticTools/tree/main/EntraTokenValidation)
7498

75-
If you're having trouble using Microsoft Entra ID to authenticate Redis connections, run this script to analyze your Microsoft Entra token and identify any issues.
99+
This PowerShell script validates Microsoft Entra ID tokens for Azure Managed Redis Cache resources. The script checks tokens and verifies access policies to help you diagnose authentication issues.
76100

77101
## Client library support
78102

articles/redis/troubleshoot-connectivity.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Troubleshoot connectivity in Azure Managed Redis
33
description: Learn how to resolve connectivity problems when creating clients with Azure Managed Redis.
4-
ms.date: 05/18/2025
4+
ms.date: 02/12/2026
55
ms.topic: conceptual
66
ms.custom:
77
- template-concept
@@ -21,6 +21,7 @@ In this article, we provide troubleshooting help for connecting your client appl
2121
- [Kubernetes hosted applications](#kubernetes-hosted-applications)
2222
- [Linux-based client application](#linux-based-client-application)
2323
- [Continuous connectivity issues](#continuous-connectivity)
24+
- [Test connectivity using Azure CLI](#test-connectivity-using-azure-cli)
2425
- [Test connectivity using _redis-cli_](#test-connectivity-using-redis-cli)
2526
- [Test connectivity using PSPING](#test-connectivity-using-psping)
2627
- [Private endpoint configuration](#private-endpoint-configuration)
@@ -50,6 +51,34 @@ Using optimistic TCP settings in Linux might cause client applications to experi
5051

5152
If your application can't connect to your Azure Managed Redis instance, it's possible some configuration on the cache isn't set up correctly. The following sections offer suggestions on how to make sure your cache is configured correctly.
5253

54+
### Test connectivity using Azure CLI
55+
56+
You can use the Azure CLI to quickly test if you can connect to your Redis cluster. The [az redisenterprise test-connection](/cli/azure/redisenterprise#az_redisenterprise_test_connection) command is helpful for debugging connection issues and verifies end-to-end connectivity by sending a `ping` command.
57+
58+
For prerequisites to use the Azure CLI with Azure Managed Redis, see [Manage an Azure Managed Redis cache using the Azure CLI](scripts/create-manage-cache.md).
59+
60+
61+
To test connection with Microsoft Entra ID authentication (the default), run the following command:
62+
63+
```azurecli
64+
az redisenterprise test-connection --name <cache-name> --resource-group <resource-group-name>
65+
```
66+
67+
Or explicitly specify Entra authentication:
68+
69+
```azurecli
70+
az redisenterprise test-connection --name <cache-name> --resource-group <resource-group-name> --auth entra
71+
```
72+
73+
> [!NOTE]
74+
> This command uses the credential established through `az login`, which supports user accounts, managed identities, or service principals.
75+
76+
To test connection with access key authentication, run the following command:
77+
78+
```azurecli
79+
az redisenterprise test-connection --name <cache-name> --resource-group <resource-group-name> --auth accesskey --access-key <access-key-value>
80+
```
81+
5382
### Test connectivity using _redis-cli_
5483

5584
Test connectivity using _redis-cli_. For more information on CLI, [Use the Redis command-line tool with Azure Managed Redis](how-to-redis-cli-tool.md).

0 commit comments

Comments
 (0)