# withDelegation

withDelegation in @provenanceauth/rails/a2a, Rails. The message with the grant attached under the extension URI, and the URI listed in `extensions`.

## Signature

```ts
withDelegation<M extends A2AMessage>(message: M, data: DelegationMessageData): M
```

## Parameters

- `message` (M)
- `data` (DelegationMessageData)

## Returns

`M`

Runs locally, with no request to the API.
