# asSecretId

- Module: [CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager](/reference/api/typescript/communitytoolkit.aspire.hosting.bitwarden.secretmanager.md)
- Version: `13.5.0`
- Kind: `method`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/4ff8268fbd97ddd23cb73dc8eff9cc92718156d1)

Returns an `IExpressionValue` that resolves to the Bitwarden secret identifier. Pass it to `WithEnvironment` to inject the secret ID as an environment variable. The app then uses the Bitwarden SDK to fetch the secret value at runtime.

## Definition

```typescript
interface BitwardenSecretResource {
  // ... omitted for brevity
  asSecretId(): IExpressionValue
}
```

## Returns

`IExpressionValue`

## Applies to

- [BitwardenSecretResource](/reference/api/typescript/communitytoolkit.aspire.hosting.bitwarden.secretmanager/bitwardensecretresource.md)
