|
1 | 1 | --- |
2 | 2 | title: Use Microsoft Entra for cache authentication with Azure Managed Redis |
3 | 3 | description: Learn how to use Microsoft Entra with Azure Managed Redis. |
4 | | -ms.date: 11/05/2025 |
| 4 | +ms.date: 02/12/2026 |
5 | 5 | ms.topic: conceptual |
6 | 6 | ms.custom: |
7 | 7 | - references_regions |
@@ -66,13 +66,37 @@ If you have used access keys in the past for authentication, you need to update |
66 | 66 |
|
67 | 67 | ## Troubleshooting Microsoft Entra ID and your cache |
68 | 68 |
|
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. |
70 | 70 |
|
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, run the following command: |
| 79 | + |
| 80 | +```azurecli |
| 81 | +az redisenterprise test-connection --name <cache-name> --resource-group <resource-group-name> |
| 82 | +``` |
72 | 83 |
|
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) |
74 | 98 |
|
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. |
76 | 100 |
|
77 | 101 | ## Client library support |
78 | 102 |
|
|
0 commit comments