连接到Azure SQL数据库时进行Active Directory身份验证

Need to access an Azure SQL database but because of how it was created I need to use Active Directory-Integrated authentication.

I don't see any samples for go that would be helpful. If I could use a connection string I know how to do this, but with the GO driver it doesn't seem obvious

Any and all ideas are appreciated

There's a good article on the subject that can be found at docs.microsoft.com.

You do have a few options, with various pros and cons. However, the simplest is to inject the AAD username/password into the connection string by setting the property Authentication to Active Directory Password and then providing the properties UID and PWD.