title: ADOMD.net Impersonate Windows User ID
body: <p>I am trying to connect to a SSAS Cube which uses windows authentication</p>
  
  <p>My web application is stored on a seperate server the SQL Analysis Instance (lets says <code>ServerWebApp</code>)  and the SSAS Cube is on <code>ServerCUBE</code> </p>
  
  <pre><code>OLAPCon = New AdomdConnection("Provider=MSOLAP.4; roles=Administrator; Integrated Security=SSPI; Persist Security Info=True; EffectiveUserName=&lt;Domain\Username&gt;; " _
  &amp; " Initial Catalog=&lt;DBName&gt;; Data Source=&lt;ServerCUBE&gt;; ")
  </code></pre>
  
  <p>As SSAS uses Windows authentication I have tried to impersonate my windows login by specifing <code>EffectiveUserName</code> however, this doesn't seem to work as I am getting the follow error:</p>
  
  <pre><code>Either the user, Domain\ServerWebApp, does not have access to the &lt;DBName&gt; database, or the database does not exist. 
  </code></pre>
  
  <p>As you can see it is using the web apps login ID not my windows ID</p>
  
  <p>How would I impersonate my windows ID in the SSAS ADOMD connection string?</p>