How To: Windows 8 “Windows Authentication” with Sql Server

The company I work for has an application that connects to a Microsoft Sql Server via Windows Authentication. In Windows 8 the only way to connect was to setup the user account as a “local” account. The downside to this is that you lose some functionality such as OneDrive support.

Because the Windows Live account doesn’t use windows authentication I would get this error message: “[Microsoft][ODBC SQL Server DRiver][SQL Server]Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.


I have figured out a work around. I got this idea from a post by John Paul Cook on

First you have to create a local account that works with your server. Setup the program so that it works correctly in this local account.

Now switch to your Windows Live account (a separate user) and modify the program’s shortcut. The target needs to be changed. C:\Windows\System32\runas.exe /user:domainName\localAccountName /savecred “pathToExecutable”


Where localAccountName is the username of the local account you created earlier and pathToExecutable is the file path for the program that needs to use Windows Authentication.

The first time you launch the program it will ask for the password for the local account. The second time the credentials should be saved.

Problem solved 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s