@@ -285,6 +285,7 @@ public async Task ContainerIdentitySas_AllPermissions()
285285 }
286286
287287 [ RecordedTest ]
288+ [ LiveOnly ] // Cannot record Entra ID token
288289 [ ServiceVersion ( Min = BlobClientOptions . ServiceVersion . V2026_02_06 ) ]
289290 public async Task ContainerIdentitySAS_DelegatedObjectId ( )
290291 {
@@ -303,11 +304,11 @@ public async Task ContainerIdentitySAS_DelegatedObjectId()
303304 // We need to get the object ID from the token credential used to authenticate the request
304305 TokenCredential tokenCredential = TestEnvironment . Credential ;
305306 AccessToken accessToken = await tokenCredential . GetTokenAsync (
306- new TokenRequestContext ( new [ ] { "https://storage.azure.com/.default" } ) ,
307+ new TokenRequestContext ( Scopes ) ,
307308 CancellationToken . None ) ;
308309
309310 JwtSecurityToken jwtSecurityToken = new JwtSecurityTokenHandler ( ) . ReadJwtToken ( accessToken . Token ) ;
310- jwtSecurityToken . Payload . TryGetValue ( "oid" , out object objectId ) ;
311+ jwtSecurityToken . Payload . TryGetValue ( Constants . Sas . ObjectId , out object objectId ) ;
311312
312313 BlobSasBuilder blobSasBuilder = new BlobSasBuilder ( BlobContainerSasPermissions . Read , Recording . UtcNow . AddHours ( 1 ) )
313314 {
@@ -333,6 +334,7 @@ public async Task ContainerIdentitySAS_DelegatedObjectId()
333334 }
334335
335336 [ RecordedTest ]
337+ [ LiveOnly ] // Cannot record Entra ID token
336338 [ ServiceVersion ( Min = BlobClientOptions . ServiceVersion . V2026_02_06 ) ]
337339 public async Task ContainerIdentitySAS_DelegatedObjectId_Fail ( )
338340 {
@@ -351,11 +353,11 @@ public async Task ContainerIdentitySAS_DelegatedObjectId_Fail()
351353 // We need to get the object ID from the token credential used to authenticate the request
352354 TokenCredential tokenCredential = TestEnvironment . Credential ;
353355 AccessToken accessToken = await tokenCredential . GetTokenAsync (
354- new TokenRequestContext ( new [ ] { "https://storage.azure.com/.default" } ) ,
356+ new TokenRequestContext ( Scopes ) ,
355357 CancellationToken . None ) ;
356358
357359 JwtSecurityToken jwtSecurityToken = new JwtSecurityTokenHandler ( ) . ReadJwtToken ( accessToken . Token ) ;
358- jwtSecurityToken . Payload . TryGetValue ( "oid" , out object objectId ) ;
360+ jwtSecurityToken . Payload . TryGetValue ( Constants . Sas . ObjectId , out object objectId ) ;
359361
360362 BlobSasBuilder blobSasBuilder = new BlobSasBuilder ( BlobContainerSasPermissions . Read , Recording . UtcNow . AddHours ( 1 ) )
361363 {
0 commit comments