Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

328
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda