Mark Bonafe
Mark Bonafe

Reputation: 1493

C# WPF Application Connection to SQL SERVER using MSA

We are switching security for SQL Server so that only Managed Service Accounts are used.
Currently, I am providing usernames and passwords in my connection strings. Once the MSAs are setup, do I simply change my connection strings to use Trusted_Connection=True and remove the username and password?

I thought finding examples of using MSAs with C# would be quite simple.

Upvotes: 0

Views: 672

Answers (1)

Preben Huybrechts
Preben Huybrechts

Reputation: 6151

You can use Integrated Security=SSPI or Trusted_Connection=True see docs. As long as your application is executing as u user that has access to the database. For example: If you are domain\johndoe

Then on the database you must have a SQL login for domain\johndoe or for a user group where the use is part of.

Upvotes: 1

Related Questions