goauthentik / goauthentik/authentik
Scope mappings not executed for proxy providers in 2026.2.4
- Dominant language
- Python
- Stars
- 25.6k
- Forks
- 2k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 659
Description
### Describe the bug
I need to override username for Proxy provider. Up until 2025.10.* I was using:
```
return {
"preferred_username": request.user.attributes.get("TV_User", request.user.username)
}
```
Now after updating to 2026.2.4 I no longer seem to be able to override username (HTTP_X_AUTHENTIK_USERNAME) in any way.
I also tried:
```
username_override = request.user.attributes.get("TV_User", request.user.username)
return {
"ak_proxy": {
"user_attributes": {
"additionalHeaders": {
"X-authentik-username": username_override
}
}
}
}
```
Also without luck. It also seams that the scope is never actually called. If I added log `ak_logger.info("proxy_override_mapping", user=request.user.username, tv_user=request.user.attributes.get("TV_User", "N/A"))` to mapping the log did not appear while accessing proxy.
### How to reproduce
Set scope mappings. Apply them to Proxy Provider.
### Expected behavior
HTTP_X_AUTHENTIK_USERNAME should be overridable by scope mappings.
### Screenshots
_No response_
### Additional context
_No response_
### Deployment Method
Docker
### Version
2026.2.4
### Relevant log output
```shell
```
Contributor guide
Assessment
This issue has not been assessed yet.