title: Power BI gateway issue with live SSAS Tabular connection
body: <p>We are not able to connect from Powerbi.com live SSAS tabular connection using gateway. Here are some backgroud details:</p>
  
  <ul>
  <li>SQL Server 11.0.6020</li>
  <li>Gateway is the latest downloaded today (10/28/206)</li>
  <li>powerbi@customer.com is synced to Azure AD from on-premise AD</li>
  <li>powerbi@customer.com account is used to login powerbi.com and to connect to data model. Its SSAS admin and also with admin rights on data model. Gateway is also setup with that account.</li>
  </ul>
  
  <p>Gateway looks fine. We got message "Online: You are good to go."</p>
  
  <p>Data source looks fine: "Connection Successful"</p>
  
  <p>But as soon as I go in Powerbi.com: "Get Data" -> "SQL Server SSAS" -> "Connect" and select the data source I get the error:</p>
  
  <pre><code>Something went wrong:
  
  Technical details:
  Activity ID: b839be39-e0ec-ed9e-9708-89b1afa14191
  Request ID: 45f45676-68cc-7006-9018-8def3d9dbdc1
  Date: 2016-10-28 06:09:41Z (UTC)
  Error text: Ilmeni seuraava järjestelmävirhe:
  Cluster URI: https://wabi-europe-north-b-redirect.analysis.windows.net
  </code></pre>
  
  <p>Error is in Finnish but it means "We got following system error"</p>
  
  <p>In Gateway logs we can see following errors:</p>
  
  <pre><code>DM.EnterpriseGateway Information: 0 : 2016-10-28T06:09:41.3503946Z DM.EnterpriseGateway    0cdc41c9-8683-45d9-bdbc-ba11b294dfd0        45f45676-68cc-7006-9018-8def3d9dbdc1 MGPP     b839be39-e0ec-ed9e-9708-89b1afa14191         E5E3865A [DM.GatewayCore] Deserialized OpenConnectionRequest, executing
  DM.EnterpriseGateway Information: 0 : 2016-10-28T06:09:41.3503946Z DM.EnterpriseGateway    1bb454c2-e6a2-4026-a920-c53a59a78981        45f45676-68cc-7006-9018-8def3d9dbdc1 MGCC     b839be39-e0ec-ed9e-9708-89b1afa14191         F5100A95 [DM.GatewayCore] Db pool opening raw database connection to [MSOLAP.5: &lt;pi&gt;MSOLAP.5rovider=MSOLAP.5;data source=sqlserver;initial catalog=Database;timeout=180;effectiveusername=powerbi@customer.com;sspropinitappname=PowerBI:[Windows] Encrypted Credential information omitted&lt;/pi&gt;]
  DM.EnterpriseGateway Error: 0 : 2016-10-28T06:09:41.4128883Z DM.EnterpriseGateway 1bb454c2-e6a2-4026-a920-c53a59a78981         45f45676-68cc-7006-9018-8def3d9dbdc1 MGCC     b839be39-e0ec-ed9e-9708-89b1afa14191     BAA79098 [DM.Pipeline.Diagnostics] Exception object created [IsBenign=True]: Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.AdomdDataAccessErrorResponseException: AdomdException encountered while accessing the target data source.; ErrorShortName: AdomdDataAccessErrorResponseException[ErrorCode=-1056899072,HResult=-2146233088]/Wrapped(AdomdErrorResponseException)[ErrorCode=-1056899072,HResult=-2146233088]
  DM.EnterpriseGateway Error: 0 : 2016-10-28T06:09:41.4128883Z DM.EnterpriseGateway 1bb454c2-e6a2-4026-a920-c53a59a78981         45f45676-68cc-7006-9018-8def3d9dbdc1 MGCC     b839be39-e0ec-ed9e-9708-89b1afa14191     2E87F8B5 [DM.Pipeline.Common.TracingTelemetryService] Event: FireActivityCompletedWithFailureEvent (duration=69, err=AdomdDataAccessErrorResponseException, rootcauseErrorEventId=0)
  DM.EnterpriseGateway Error: 0 : 2016-10-28T06:09:41.4128883Z DM.EnterpriseGateway fb150b2a-d618-4b7b-9abf-1da42d6c549c         45f45676-68cc-7006-9018-8def3d9dbdc1 MGGC     b839be39-e0ec-ed9e-9708-89b1afa14191     96BF2BFF [DM.Pipeline.Common.TracingTelemetryService] Event: FireActivityCompletedWithFailureEvent (duration=72, err=AdomdDataAccessErrorResponseException, rootcauseErrorEventId=0)
  DM.EnterpriseGateway Error: 0 : 2016-10-28T06:09:41.4128883Z DM.EnterpriseGateway e19083b1-8457-474d-9e60-dc2fb065197f         45f45676-68cc-7006-9018-8def3d9dbdc1 MGOC     b839be39-e0ec-ed9e-9708-89b1afa14191     96BF2BFF [DM.Pipeline.Common.TracingTelemetryService] Event: FireActivityCompletedWithFailureEvent (duration=72, err=AdomdDataAccessErrorResponseException, rootcauseErrorEventId=0)
  DM.EnterpriseGateway Error: 0 : 2016-10-28T06:09:41.4128883Z DM.EnterpriseGateway 0cdc41c9-8683-45d9-bdbc-ba11b294dfd0         45f45676-68cc-7006-9018-8def3d9dbdc1 MGPP     b839be39-e0ec-ed9e-9708-89b1afa14191     655A6564 [DM.Pipeline.Common.TracingTelemetryService] Event: FireActivityCompletedWithFailureEvent (duration=73, err=AdomdDataAccessErrorResponseException, rootcauseErrorEventId=0)
  DM.EnterpriseGateway Error: 0 : 2016-10-28T06:09:41.4128883Z DM.EnterpriseGateway ac8ba607-b76f-494b-8f11-2e69ff096d5d         45f45676-68cc-7006-9018-8def3d9dbdc1 MDSR     b839be39-e0ec-ed9e-9708-89b1afa14191     4CD88F16 [DM.GatewayCore] Error processing request: [0]Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.AdomdDataAccessErrorResponseException: AdomdException encountered while accessing the target data source.
  </code></pre>
  
  <p>This error is continued with:</p>
  
  <pre><code>GatewayPipelineErrorCode=DM_GWPipeline_Gateway_DataSourceAccessError
  ErrorCode=-1056899072 ---&gt;
  [1]Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.GatewayPipelineWrapperException: Substituted: AdomdErrorResponseException:&lt;pi&gt;Microsoft.AnalysisServices.AdomdClient.AdomdErrorResponseException: Ilmeni seuraava järjestelmävirhe:
     at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Connect(Boolean toIXMLA)
     at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)
     at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayDataAccess.AdomdConnectionProvider.OpenConnectionAsync()&lt;/pi&gt;
  </code></pre>
  
  <p>And finally: </p>
  
  <pre><code>GatewayPipelineErrorCode=DM_GWPipeline_UnknownError
  InnerType=AdomdErrorResponseException
  InnerMessage=&lt;pi&gt;Ilmeni seuraava järjestelmävirhe: &lt;/pi&gt;
  InnerToString=&lt;pi&gt;Microsoft.AnalysisServices.AdomdClient.AdomdErrorResponseException: Ilmeni seuraava järjestelmävirhe:
     at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Connect(Boolean toIXMLA)
     at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)
     at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayDataAccess.AdomdConnectionProvider.OpenConnectionAsync()&lt;/pi&gt;
  InnerCallStack=   at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Connect(Boolean toIXMLA)
     at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)
     at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayDataAccess.AdomdConnectionProvider.OpenConnectionAsync()
    ([1]Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.GatewayPipelineWrapperException.StackTrace
     at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Connect(Boolean toIXMLA)
     at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)
     at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayDataAccess.AdomdConnectionProvider.OpenConnectionAsync()
     --- End of inner exception stack trace ---
    ([0]Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.AdomdDataAccessErrorResponseException.StackTrace
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayDataAccess.AdomdConnectionProvider.OpenConnectionAsync()
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.ConnectionStrings.AdoNetDbFullConnectionString.&lt;OpenConnectionAsync&gt;d__5.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.AdoNetDbConnectionPool.&lt;&gt;c__DisplayClass1.&lt;&lt;CreateObjectInstance&gt;b__0&gt;d__3.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.Common.Diagnostics.PipelineTelemetryService.&lt;ExecuteInActivity&gt;d__a`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.AdoNetDbConnectionPool.&lt;CreateObjectInstance&gt;d__a.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.Common.Pool.BasePool`3.&lt;CreatePoolObject&gt;d__1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.Common.Pool.StatelessPool`2.&lt;Get&gt;d__2.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayProcessor.&lt;&gt;c__DisplayClass5e.&lt;&lt;GetDatabaseConnection&gt;b__5d&gt;d__60.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.Common.Diagnostics.PipelineTelemetryService.&lt;ExecuteInActivity&gt;d__a`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayProcessor.&lt;GetDatabaseConnection&gt;d__66.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayProcessor.&lt;&gt;c__DisplayClass2.&lt;&lt;EnsureConnection&gt;b__1&gt;d__4.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.Common.Diagnostics.PipelineTelemetryService.&lt;ExecuteInActivity&gt;d__a`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayProcessor.&lt;EnsureConnection&gt;d__8.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayProcessorDispatcher.&lt;DispatchImpl&gt;d__e.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.GatewayProcessorDispatcher.&lt;Dispatch&gt;d__b.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.Serialization.GatewayDeserializer.&lt;DeserializeImpl&gt;d__e.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.Serialization.GatewayDeserializer.&lt;&gt;c__DisplayClass4.&lt;&lt;Deserialize&gt;b__2&gt;d__6.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.Common.Diagnostics.PipelineTelemetryService.&lt;ExecuteInActivity&gt;d__a`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.Serialization.GatewayDeserializer.&lt;Deserialize&gt;d__9.MoveNext()
  </code></pre>
  
  <p>The cleartext error message is in English only "Following system error occurred". BTW times in logfiles looks like powerbi.com timezone times not the local server time.</p>
  
  <p>Any ideas what we should try next? We have already tried reinstalled gateway few times.</p>
  
  <p>Jens: currently SSAS is running with default NT Service\MSSQLServerOLAPService</p>
  
  <p>Greg: When logged in to server with powerbi@customer.com whoami /upn will give me the correct one but when I use runas command to start command prompt with powerbi@customer.com it will give me powerbi@customer.local addess.</p>
  
  <p>powerbi@customer.com is admin for the whole SSAS instance. (as well as admin in that specific datamodel)</p>
  
  <p>Did you mean the standard Connect to Analysis Services dialog? When I put effectiveusername=powerbi@customer.com to additional connection parameter it will always give system error.</p>