Power Query SQL Server connection - authenticate "windows alternative user account"

2

I am using Excel 2013 PowerQuery addin to connect to SQL Server database. I have Excel open with my user account (domain/Sherlock); which does not have read access to the database (myServer/myDB). I have the credentials for another Windows user account (domain/Sherlock_2), which does have read access.

Objective:

I would like to open excel as normal user (domain/Sherlock - db read access not granted) and have excel PQ connect to db as another user (domain/Sherlock_2 - db read access privilege).

Does anyone know how to authenticate as windows alternative user account?


Steps I have tried (Windows Alternative User)

1. In Excel change the PQ DB authentication

PQ ribbon> Data source settings> '@myDB'> Edit Permissions>
Credentials: 'Windows' 
User alternate credentials: '@domain/@Sherlock_2'

2. In Excel try connecting to DB

PQ ribbon> from database> SQL Server> 
Server:'@myServer', 
Database: '@myDB'> 
Advanced options> SQL statement: 'select * from table'> OK

Error message:

Details: "An error happened while reading data from the provider: 'Could not load file or assembly 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)'"

3. Try again

I tried clearing the permissions in 'Data source settings' and start over from scratch. Still the same message: HRESULT: 0x80070542.


More steps I have tried (As Admin)

Based on this PowerBI Community post, the DB connection will work with the standard account after connecting initially for the first time "As Admin".

1. Open Excel (Excel As Admin)

I ran Excel 'As Admin' with '@domain/@Sherlock_2' and created the same data source connection with User alternate credentials '@domain/@Sherlock_2' ... PQ connection successfully made to DB.

2. Open Excel (Normal)

And then I tried running Excel 'Normal' with '@domain/@Sherlock'... PQ connection error message HRESULT: 0x80070542.

NOTE: I tried also runnning Excel 'As Admin' with '@domain/@Sherlock', I get the message "The requested operation requires elevation".


Authentication setup screenshot:

enter image description here

Connection and error screenshot:

enter image description here

sql-server
excel
authentication
excel-2013
powerquery
asked on Stack Overflow Oct 19, 2018 by SherlockSpreadsheets • edited Oct 19, 2018 by SherlockSpreadsheets

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0