How to access the Redis from another tenant with Entra ID authenticcation

Kefei Qian 40 Reputation points Microsoft Employee
2025-05-26T13:54:55.28+00:00

Hi Team,

I have an App Service in Tenant A that needs to access a Redis instance in Tenant B. To enable this, I created a Service Principal in Tenant B, linked to a multi-tenant app registered in Tenant A, and granted it the Redis Data Contributor role.

However, when attempting to connect to the Redis instance using Python and MSAL on my local machine, I encounter an error indicating an invalid username-password pair. For authentication, I'm using the Service Principal's Object ID as the username and a token obtained via the Azure.Identity library (ConfidentialClientApplication) as the password.

Azure Cache for Redis
Azure Cache for Redis

An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.


1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.