Skip to content

Commit 419b0c7

Browse files
committed
Fix invalid scope in Lettuce sample using identity for Redis Cache
1 parent 0cf0541 commit 419b0c7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

sdk/identity/azure-identity/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Breaking Changes
88

99
### Bugs Fixed
10+
- Fix invalid scope in Lettuce sample using identity for Redis Cache.
1011

1112
### Other Changes
1213

sdk/identity/azure-identity/src/samples/Azure-Cache-For-Redis/Lettuce/Azure-AAD-Authentication-With-Lettuce.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ System.out.println(sync.get("Az:testKey"));
112112
public static class AzureRedisCredentials implements RedisCredentials {
113113
// Note: The Scopes value will change as the Microsoft Entra authentication support hits public preview and eventually GA's.
114114
private TokenRequestContext tokenRequestContext = new TokenRequestContext()
115-
.addScopes("cca5fbb-b7e4-4009-81f1-37e38fd66d78/.default");
115+
.addScopes("https://redis.azure.com/.default");
116116
private TokenCredential tokenCredential;
117117
private final String username;
118118

@@ -198,7 +198,7 @@ DefaultAzureCredential defaultAzureCredential = new DefaultAzureCredentialBuilde
198198
// Note: The Scopes parameter will change as the Microsoft Entra authentication support hits public preview and eventually GA's.
199199
String token = defaultAzureCredential
200200
.getToken(new TokenRequestContext()
201-
.addScopes("cca5fbb-b7e4-4009-81f1-37e38fd66d78/.default")).block().getToken();
201+
.addScopes("https://redis.azure.com/.default")).block().getToken();
202202

203203
String username = extractUsernameFromToken(token);
204204

0 commit comments

Comments
 (0)