# BitwardenSecretResource.asSecretId

- Module: [CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager](/reference/api/typescript/communitytoolkit.aspire.hosting.bitwarden.secretmanager.md)
- Defined on: [BitwardenSecretResource](/reference/api/typescript/communitytoolkit.aspire.hosting.bitwarden.secretmanager/bitwardensecretresource.md)
- Version: `13.5.0`
- Kind: `method`

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;
}
```

## Signature

```typescript
asSecretId(): IExpressionValue
```

## Returns

`IExpressionValue`

## Defined on

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