--- id: redis-entraid version: "1.2.1" license: unclear license_treatment: unclear maintenance: active --- # redis-entraid — Entra ID credentials provider implementation for Redis-py client License: unclear · Maintenance: active · Downloads: 998.9K/mo ## What it is and what it does redis-entraid is a credential provider for redis-py that handles authentication to Azure's Redis services using Microsoft Entra ID. Instead of managing static passwords or connection strings, it integrates with Azure's identity services to fetch and refresh authentication tokens automatically. The package supports three authentication patterns: system-assigned managed identities (for Azure services), user-assigned managed identities (for cross-resource scenarios), and service principals (for application-to-service authentication). The package wraps redis-py and sits between your application and the Redis client, managing token lifecycle in the background. It requires Python 3.10 or later and depends on redis, PyJWT, msal, azure-identity, and requests. You create a credential provider using one of three factory methods, optionally configure token refresh behavior, and pass it to the Redis client constructor. The package handles token expiration and renewal transparently, though you can also fetch credentials explicitly for testing or monitoring. Use it for: - Authenticate to Azure Managed Redis using a system-assigned or user-assigned managed identity without hardcoding credentials. - Connect application service principals to Azure Cache for Redis with automatic token renewal in the background. - Use Default Azure Credential to let the SDK automatically select the right authentication method based on the deployment environment. - Replace static Redis passwords with Entra ID-based access control for compliance and security auditing in Azure-hosted applications. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Entra ID (Azure Active Directory) authentication for redis-py clients connecting to Azure Managed Redis and Azure Cache for Redis services. Yes, if you are running Python 3.10+ and connecting to Azure Redis services. The package eliminates password management overhead and integrates cleanly with Azure's identity ecosystem. No known vulnerabilities, active maintenance, and low install friction. The only gotcha is that Entra ID authentication must be enabled on your Azure Redis instance and your identity must be granted access—this is an Azure configuration requirement, not a package limitation. ## Install pip install redis-entraid uv add redis-entraid poetry add redis-entraid ## Installing redis-entraid Before you install: Low install friction with a pure-Python wheel distribution. Active maintenance status with recent releases. Depends on five runtime packages including redis, msal, and azure-identity, all standard Azure SDK components. Quickstart: pip install redis-entraid from redis import Redis from redis_entraid.cred_provider import create_from_service_principal credential_provider = create_from_service_principal( CLIENT_ID, CLIENT_SECRET, TENANT_ID ) client = Redis(host=HOST, port=PORT, ssl=True, credential_provider=credential_provider) print(client.dbsize()) Requires Python 3.10 or later. Azure Redis instance must have Entra ID authentication enabled and the service principal or managed identity must be granted access to the cache resource. Verify before relying: - Whether token renewal happens transparently during long-lived connections or requires explicit refresh calls - Performance impact of background token management on connection pool behavior - Compatibility with redis-py cluster or sentinel modes beyond standard connections ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 998.9K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags azure redis authentication, entra id redis client, managed identity redis, azure active directory redis, service principal redis, redis-py azure integration, azure cache for redis auth, azure-integration, authentication [View on SkillFed](https://skillfed.io/packages/redis-entraid) · [View on PyPI](https://pypi.org/project/redis-entraid/)