Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

327
Views
How to Connect to Tabular Cube Server Using Credentials Provided in a ConnectionString?

Microsoft says:

https://docs.microsoft.com/en-us/analysis-services/instances/connection-string-properties-analysis-services?view=asallproducts-allversions

"When connecting over TCP to SSAS, the client library will impersonate the Windows user using the specified username and password, and then connect as usual to the server."

"When connecting over HTTP(S) to SSAS, the credentials are provided to the web server based on the authentication mode configured on the web server, for example Basic auth or Windows auth. The web server will perform the appropriate Windows impersonation before connecting to the SSAS server, therefore providing the correct credentials flow to the server."

However, when I do this:

 using Tabular = Microsoft.AnalysisServices.Tabular;

 using (Tabular.Server server = new Tabular.Server())
 {   
    //connectionString = "Provider=MSOLAP;DataSource=ServerIP;UserID=xx;Password=xx;Persist Security Info=True;Impersonation Level=Impersonate;"

    server.Connect(connectionString);
 }

It uses the credentials of my user account that's running the code, not the the UserID and Password in the ConnectionString.

How can I get it to connect via "TCP"?

UPDATE: Using the suggestion from @GregGalloway and logic from here: I've implemented an Impersonator class. With it I've updated my code to do the following:

using (Tabular.Server server = new Tabular.Server())
{
     using (new Impersonator("UserName", "Domain", "Password"))
     {
           server.Connect(connectionString);
     }
}

Unfortunately, when I profile the call to the SSAS server, I can see that it is still using the same credentials as before and the connection to the server is successful regardless of any credentials being passed to the constructor. Stepping through the code I can see that no exceptions are being thrown at any point.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If your app or web app isn’t already running under those credentials then you will need to impersonate that identity in your code before you connect. Here is an example.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!