# WithSignInAudience

- Module: [Aspire.Hosting.Azure.EntraId](/reference/api/go/aspire.hosting.azure.entraid.md)
- Version: `17.0.0-preview.1.26565.2`
- Kind: `method`
- Defined on: [`EntraIdApplicationResource`](/reference/api/go/aspire.hosting.azure.entraid/entraidapplicationresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Configures which accounts can sign in to this application.

## Remarks

The audience must match the registration's supported account types. The default uses the home tenant as TenantId.
Other audiences use organizations, common, or consumers as TenantId and also emit AppHomeTenantId.
Also configures supported account types on registrations created by Aspire. For existing registrations, configures consumers only.
Validate the tenant ID (tid) claim before allowing access to tenant-specific data.
See https://learn.microsoft.com/entra/identity-platform/claims-validation.

## Definition

```go
func (EntraIdApplicationResource) WithSignInAudience(signInAudience EntraIdSignInAudience) EntraIdApplicationResource
```

## Parameters

- `signInAudience` ([`EntraIdSignInAudience`](/reference/api/go/aspire.hosting.azure.entraid/entraidsigninaudience.md)) -- The accounts that can sign in. It must match the "Supported account types" setting of the app registration.

## Returns

[`EntraIdApplicationResource`](/reference/api/go/aspire.hosting.azure.entraid/entraidapplicationresource.md) -- The resource builder for chaining.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`EntraIdApplicationResource`](/reference/api/go/aspire.hosting.azure.entraid/entraidapplicationresource.md)
