-
|
I am getting a Server returned invalid response: unexpected HTTP status code. I have followed the ADFS OIDC setting by Bitwarden. https://bitwarden.com/help/adfs-oidc-implementation/ The main difference I believe is that the callback is supposed to be https://your.domain/identity/connect/oidc-signin instead of https://your.domain.com/sso/oidc-signin. Below is the logs I pulled from my docker container. vaultwarden | [2025-09-19 15:31:34.750][request][INFO] GET /api/config
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
I have now tried removing Ngnix Proxy Manager from the equation. That has not fixed the situation. I am still getting these errors vw | [2025-09-19 22:44:27.542][vaultwarden::sso_client][ERROR] Request to user_info endpoint failed: Server returned invalid response: unexpected HTTP status code |
Beta Was this translation helpful? Give feedback.
-
|
If anyone is running into this issue while connecting Vaultwarden to an on-prem ADFS server (or any OIDC provider using an internal Certificate Authority), the root cause is likely an SSL handshake failure. Because Vaultwarden relies on the underlying Debian OS certificate store inside the container, it doesn't automatically trust certificates issued by an internal ADCS (Active Directory Certificate Services) or other personal CA Server. It quietly drops the connection during the OIDC discovery phase, resulting in the 400 Bad Request or Server returned invalid response errors. Here is how to fix it by injecting your internal CA into the container's trust store using Docker Compose:
If you need to combine a Root and Intermediate CA, concatenate them into a single file called ca-chain.crt.
Because the official vaultwarden/server image doesn't automatically process new certificates on boot, you need to manually tell the container's OS to update its trust store. Run this from your Docker host:
You should see output similar to: 1 added, 0 removed; done.
If it returns HTTP/1.1 200 OK, the container now fully trusts your ADFS server. Your SSO login flow should now successfully redirect! (Note: Just remember that due to Bitwarden's zero-knowledge architecture, ADFS only handles authentication. Users will still be prompted for their Master Password to locally decrypt their vault after the SSO token is accepted). |
Beta Was this translation helpful? Give feedback.
If anyone is running into this issue while connecting Vaultwarden to an on-prem ADFS server (or any OIDC provider using an internal Certificate Authority), the root cause is likely an SSL handshake failure.
Because Vaultwarden relies on the underlying Debian OS certificate store inside the container, it doesn't automatically trust certificates issued by an internal ADCS (Active Directory Certificate Services) or other personal CA Server. It quietly drops the connection during the OIDC discovery phase, resulting in the 400 Bad Request or Server returned invalid response errors.
Here is how to fix it by injecting your internal CA into the container's trust store using Docker Compose: