diff --git a/sdk/identity/azure-identity/src/samples/Azure-Cache-For-Redis/Lettuce/Azure-AAD-Authentication-With-Lettuce.md b/sdk/identity/azure-identity/src/samples/Azure-Cache-For-Redis/Lettuce/Azure-AAD-Authentication-With-Lettuce.md index 4ee97c668a83..9d655e16e165 100644 --- a/sdk/identity/azure-identity/src/samples/Azure-Cache-For-Redis/Lettuce/Azure-AAD-Authentication-With-Lettuce.md +++ b/sdk/identity/azure-identity/src/samples/Azure-Cache-For-Redis/Lettuce/Azure-AAD-Authentication-With-Lettuce.md @@ -110,9 +110,8 @@ System.out.println(sync.get("Az:testKey")); * Redis Credential Implementation for Azure Redis for Cache */ public static class AzureRedisCredentials implements RedisCredentials { - // Note: The Scopes value will change as the Microsoft Entra authentication support hits public preview and eventually GA's. private TokenRequestContext tokenRequestContext = new TokenRequestContext() - .addScopes("cca5fbb-b7e4-4009-81f1-37e38fd66d78/.default"); + .addScopes("https://redis.azure.com/.default"); private TokenCredential tokenCredential; private final String username; @@ -195,10 +194,9 @@ private static String extractUsernameFromToken(String token) { DefaultAzureCredential defaultAzureCredential = new DefaultAzureCredentialBuilder().build(); // Fetch a Microsoft Entra token to be used for authentication. The Microsoft Entra token will be used as password. -// Note: The Scopes parameter will change as the Microsoft Entra authentication support hits public preview and eventually GA's. String token = defaultAzureCredential .getToken(new TokenRequestContext() - .addScopes("cca5fbb-b7e4-4009-81f1-37e38fd66d78/.default")).block().getToken(); + .addScopes("https://redis.azure.com/.default")).block().getToken(); String username = extractUsernameFromToken(token); @@ -340,7 +338,6 @@ private static RedisClient createLettuceRedisClient(String hostName, int port, T * Redis Credential Implementation for Azure Redis for Cache */ public static class AzureRedisCredentials implements RedisCredentials { - // Note: The Scopes parameter will change as the Microsoft Entra authentication support hits public preview and eventually GA's. private TokenRequestContext tokenRequestContext = new TokenRequestContext() .addScopes("https://redis.azure.com/.default"); private TokenCredential tokenCredential; @@ -426,7 +423,6 @@ private static String extractUsernameFromToken(String token) { DefaultAzureCredential defaultAzureCredential = new DefaultAzureCredentialBuilder().build(); // Fetch a Microsoft Entra token to be used for authentication. This token will be used as the password. -// Note: The Scopes parameter will change as the Microsoft Entra authentication support hits public preview and eventually GA's. TokenRequestContext trc = new TokenRequestContext().addScopes("https://redis.azure.com/.default"); AccessToken accessToken = getAccessToken(defaultAzureCredential, trc); @@ -773,7 +769,6 @@ private static String extractUsernameFromToken(String token) { DefaultAzureCredential defaultAzureCredential = new DefaultAzureCredentialBuilder().build(); // Fetch a Microsoft Entra token to be used for authentication. This token will be used as the password. -// Note: The Scopes parameter will change as the Microsoft Entra authentication support hits public preview and eventually GA's. TokenRequestContext trc = new TokenRequestContext().addScopes("https://redis.azure.com/.default"); // Instantiate the Token Refresh Cache, this cache will proactively refresh the access token 2 minutes before expiry.