You can configure AAD authentication to use your current user credentials. So you need to set up a Managed Identity or Service Principal for your hosted environment and levrage AAD Integrated Authentication locally.
Then update your application to use the azure-identity
library to fetch AAD tokens and include the AAD URL in your JDBC connection string.
In your local machine, verify that you're authenticated with az login
and enable AAD authentication by adding the Authentication=ActiveDirectoryIntegrated
parameter in your connection string which will allow your app to use your AAD credentials during local development.