# AspireMicrosoftAzureStackExchangeRedisExtensions

- Kind: `class`
- Package: [Aspire.Microsoft.Azure.StackExchangeRedis](/reference/api/csharp/aspire.microsoft.azure.stackexchangeredis.md)
- Version: `13.3.0`
- Namespace: `Microsoft.Extensions.Hosting`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/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.
