# AspireMicrosoftAzureStackExchangeRedisExtensions

- Kind: `class`
- Package: [Aspire.Microsoft.Azure.StackExchangeRedis](/reference/api/csharp/aspire.microsoft.azure.stackexchangeredis.md)
- Version: `13.4.0`
- Namespace: `Microsoft.Extensions.Hosting`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Components/Aspire.Microsoft.Azure.StackExchangeRedis/AspireMicrosoftAzureStackExchangeRedisExtensions.cs)

Extension methods for connecting to an Azure Cache for Redis with StackExchange.Redis client using Azure AD authentication.

## Definition

```csharp
namespace Microsoft.Extensions.Hosting;

public static class AspireMicrosoftAzureStackExchangeRedisExtensions
{
    // ...
}
```

## Methods

- [WithAzureAuthentication(AspireRedisClientBuilder, TokenCredential?)](/reference/api/csharp/aspire.microsoft.azure.stackexchangeredis/aspiremicrosoftazurestackexchangeredisextensions/methods.md#withazureauthentication-aspireredisclientbuilder-tokencredential) : `AspireRedisClientBuilder` `extension` -- Configures the Redis client to use Azure AD authentication for connecting to Azure Cache for Redis.
