You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Connection dialog rejects passwords over 1024 characters, breaking Entra access tokens used as password (regression in 1.34.0) #331
The connection dialog rejects passwords longer than 1024 characters ("Must not exceed 1024 characters."). Microsoft Entra access tokens for Azure Database for PostgreSQL (for example from a managed identity) are about 1,500 characters long, so they can no longer be used as the password. This works in extension version 1.32.1 and fails in 1.34.0.
To Reproduce
Steps to reproduce the behavior:
Get an Entra access token for https://ossrdbms-aad.database.windows.net/.default (for example from a managed identity).
Open a new connection and set Authentication type to Password.
Paste the token as the password.
See the error "Must not exceed 1024 characters." under the Password field.
Expected behavior
The password is accepted and the connection can be saved, as in 1.32.1. Suggested fix: raise the limit (Entra access tokens can be several KB) or skip the length check for passwords.
Screenshots
(paste the screenshot of the Password field here)
VS Code version
1.128.0 (commit fc3def6774c76082adf699d366f31a557ce5573f), x64. Remote session on Linux 6.8.0-1030-azure (Azure ML compute instance). Extension: ms-ossdata.vscode-pgsql 1.34.0 (1.32.1 is not affected).
Extension Logs
Not applicable: the validation error appears in the connection dialog before any connection attempt.
irisdc thanks for this report. We'll look into raising the limit for password inputs. In the meantime, for this use case, can you use the integrated Entra authentication method? I assume when you generate the token, you must regenerate and update the password regularly. Using the integration will auto-renew.
I'm assuming that's an intentional choice, so curious about your use case or if the integration isn't working for you.
In the meantime, please stay on 1.32.1 while we look into this.
The "Entra Auth" setting of the extension seems to only allow the use of user accounts.
For technical/company reasons, user accounts are not used to connect to Azure PostgreSQL servers. So, to access Azure PostgreSQL servers, our regular flow is:
The developer triggers a CI/CD pipeline that generates a token using a service principal or a user-assigned managed identity and places the token in an Azure Key Vault (developer has access to the Azure Key Vault and the team lead must approve the workflow run).
The developer fetches the new/fresh token in the Azure Key Vault and copy/pastes the token in the extension as a regular password.
Process must be repeated when the token has expired (basically, it's a way to make sure developers don't have permanent access to the DB, which can potentially contain sensitive/PII data).
I hope this clarifies the need for support for long password 😉
Thanks for the explanation! The limit we chose was arbitrary, but we do need to have input length verification. There shouldn't be a reason not to have the limit be inclusive of a token length though. I'll verify that, and follow up here. Best case scenario is we would include this in the next pre-release, likey next week.
Activity
mmcfarland commentedon Nov 13, 2026
irisdc thanks for this report. We'll look into raising the limit for password inputs. In the meantime, for this use case, can you use the integrated Entra authentication method? I assume when you generate the token, you must regenerate and update the password regularly. Using the integration will auto-renew.
I'm assuming that's an intentional choice, so curious about your use case or if the integration isn't working for you.
In the meantime, please stay on 1.32.1 while we look into this.
thomas-3n commentedon Nov 13, 2026
Hello Matt McFarland (@mmcfarland), I work with irisdc, the reason why Entra ID authentication doesn't work for us is as follows:
The "Entra Auth" setting of the extension seems to only allow the use of user accounts.
For technical/company reasons, user accounts are not used to connect to Azure PostgreSQL servers. So, to access Azure PostgreSQL servers, our regular flow is:
Process must be repeated when the token has expired (basically, it's a way to make sure developers don't have permanent access to the DB, which can potentially contain sensitive/PII data).
I hope this clarifies the need for support for long password 😉
mmcfarland commentedon Nov 13, 2026
Thanks for the explanation! The limit we chose was arbitrary, but we do need to have input length verification. There shouldn't be a reason not to have the limit be inclusive of a token length though. I'll verify that, and follow up here. Best case scenario is we would include this in the next pre-release, likey next week.