Closed eddynaka closed 11 months ago
Can you confirm if you have added that "my_guid" to your environment? I was able to repro this when I removed my account linked to my GUID by signing out of Visual Studio, running az logout, and running Disconnect-AzAccount
Hi @lsannicolas,
What do you mean by environment?
Like are you running this on a local dev machine? Or on an Azure VM?
Hi,
I'm currently running on my local PC. VS2022.
Were you able to add the account/identity linked to the 'my_guid' to your local pc? Like is it signed into Visual Studio?
From this doc(https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.defaultazurecredential?view=azure-python) it mentions that defaultazurecredential will determine the identity based on environment
Yes, I'm signed on VS.
And, to be sure, I tested something similar, using AzureStorage with DefaultAzureCredentials, and it works fine
Only Managed Identities or Service Principals that have been granted access to the cache via the 'Data Access Configuration' view will be allowed to connect. You'll need to sign into VS with one of those, or configure your machine so that DefaultAzureCredential picks up one of those identities.
https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-azure-active-directory-for-authentication https://learn.microsoft.com/en-us/dotnet/api/overview/azure/identity-readme?view=azure-dotnet#environment-variables
Are there plans to support users as well? Similar to other resource types (AzureStorage, for example).
A user account can be used as a Service Principal that is granted access to a cache. For instructions see: https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-azure-active-directory-for-authentication
Hello,
I'm trying to use DefaultAzureCredentials to authenticate to Redis using the following snippet:
Expected behavior
When I run the ConsoleApp, to be able to connect into AzureRedisCache
Current behavior
Throwing exception