Accessing Azure Cache for Redis

Jithin K V 0 Reputation points
2024-05-14T21:07:10.6166667+00:00

Trying to develop containerapp to store and retrieve data from Azure cache for redis, by making use of dapr.

RBAC policy been assigned to containerapp as data owner. Connection string we have set in metadata of dapr configuration is host:portno, without password.

We are getting below error when we trying to connect

NOAUTH Authentication required. Verify if the Redis password provided is correct

Looking at primary/secondary key, in Authentication blade they are coming as blank. And if i check the connection string, password is showing as "undefined". Is that normal? Also with rbac permission assigned, what else need to be defined in dapr config to connect properly?

Azure Cache for Redis
Azure Cache for Redis
An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.
221 questions
Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
295 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Oury Ba-MSFT 16,891 Reputation points Microsoft Employee
    2024-05-14T23:49:08.2066667+00:00

    @Jithin K V Thank you for reaching out.

    The connection string should be in a format host:port,password=your_password.

    You mentioned that RBAC permissions have been assigned to your container app as a data owner. Verify that the RBAC permissions allow the container app to access the Azure Cache for Redis resource.

    https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-azure-active-directory-for-authentication

    https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-configure-role-based-access-control

    Additionally, ensure that the container app has the necessary network access (firewall rules) to connect to the Redis server.

    0 comments No comments