dbcli / mssql-cli

A command-line client for SQL Server with auto-completion and syntax highlighting
BSD 3-Clause "New" or "Revised" License
1.35k stars 192 forks source link

add support to connect via system managed identity #495

Closed darrenpricedcww closed 3 years ago

darrenpricedcww commented 3 years ago

unable to find any switch or guidance how to connect to sql utilising a system manged identity.

eg a VM with a system managed identity that has been provide access to the the sql server should be able to connect without need to supply credentials

jamesbannan commented 3 years ago

@yualan Any thoughts on this one? I've got this exact situation with a customer where we have to use username/password authentication from mssql-cli on an Azure VM with an assigned MSI. It would be great (not to mention more secure) to use the MSI.

darrenpricedcww commented 3 years ago

using sqlcmd instead