element-hq / element-hq/synapse
AssertionError: Requester must have an access_token_id when sending room events with MAS personal access tokens
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
### Description
Sending room events with a MAS personal access token (created via the MAS admin API `/api/admin/v1/personal-sessions`) results in a 500 with `M_UNKNOWN Internal server error`.
The client receives no useful error and Synapse logs show:
```
AssertionError: Requester must have an access_token_id
File "synapse/rest/client/transactions.py", line 98, in _get_transaction_key
```
### Steps to reproduce
1. Synapse configured with MAS delegated auth
2. Create a MAS personal session via `POST /api/admin/v1/personal-sessions` with scope `urn:matrix:org.matrix.msc2967.client:api:*`
3. Use the returned token to `PUT /_matrix/client/v3/rooms/{roomId}/send/m.room.message/{txnId}`
4. Get a 500, `AssertionError: Requester must have an access_token_id`
### Homeserver
private homeserver
### Synapse Version
1.149.1+ess.1
### Installation Method
Other (please mention below)
### Database
PostgreSQL 17.9
### Workers
Single process
### Platform
K8s via https://github.com/element-hq/ess-helm
### Configuration
_No response_
### Relevant log output
```shell
AssertionError: Requester must have an access_token_id
File "synapse/rest/client/transactions.py", line 98, in _get_transaction_key
```
### Anything else that would be useful to know?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.