You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/redis/entra-for-authentication.md
+29-5Lines changed: 29 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
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.
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
+
```
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:
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.
@@ -50,6 +51,34 @@ Using optimistic TCP settings in Linux might cause client applications to experi
50
51
51
52
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.
52
53
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:
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