Understand the concept behind Impersonation within a Tabular Model

Michele DuBose 131 Reputation points
2021-04-24T15:57:24.63+00:00

Hello,

I'm in need of understanding how impersonation works with a tabular model and Analysis Services Server. I have a tabular model that connects to a data source using SQL Authentication. For impersonation, I use the Service Account option. Also, the tabular model is in DirectQuery mode. From the documentation, it seems impersonation is used to fetch data from the data source and process the data on the Analysis Services Server. However, if the tabular model is in DirectQuery mode, the data is not processed or stored on the Analysis Services Server. How does impersonation work in this scenario?

Moreover, by using the Service Account option as my impersonation, does this account need to have access to the data source? I have reports that connect to the tabular model where the reports run successfully. The service account does not have access to the data source. So, I'm wondering how the reports are running successfully.

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,344 questions
0 comments No comments
{count} votes

Accepted answer
  1. Darren Gosbell 1,471 Reputation points
    2021-04-25T22:49:14.387+00:00

    However, if the tabular model is in DirectQuery mode, the data is not processed or stored on the Analysis Services Server. How does impersonation work in this scenario?

    No it's not, but the data is fetched in real time from the data source. However impersonation really only applies if you are using Windows Authentication. If you are using SQL Authentication the connection will use the username/password you have stored against the data source.

    Moreover, by using the Service Account option as my impersonation, does this account need to have access to the data source?

    Only if you are using Windows Authentication. If you are using other authentication modes where you save a fixed username/password with the connection the impersonation account does not need it's own access to the data source.


2 additional answers

Sort by: Most helpful
  1. Darren Gosbell 1,471 Reputation points
    2021-04-26T22:14:12.69+00:00

    In terms of connecting to the data source it does not really matter.

    In terms of security - using the Unattended Account or a specified Windows account with low privileges is probably safest. It's a really small risk, but if there was a bug in the data provider and that could be exploited somehow then an attacker could maybe run code on the server in the context of the impersonation account. So using a low privilege account gives you better protection from those sorts of attacks than using the service account.

    0 comments No comments

  2. Lukas Yu -MSFT 5,826 Reputation points
    2021-04-27T09:45:41.267+00:00

    As per the doc of SSAS impersonation :

    Impersonation is the ability of a server application, such as Analysis Services, to assume the identity of a client application. Analysis Services runs using a service account, however, when the server establishes a connection to a datasource, it uses impersonation so that access checks for data import and processing can be performed.

    Also there is an important tips from the doc :

    When authoring a model, ensure the credentials you are signed in with and the credentials specified for impersonation have sufficient rights to fetch the data from the datasource.

    Pratically we would suggest not using the SSAS Service Account and the impersonation account. It should be set with lowest permission and only run the SSAS Service.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.