S-C-O-U-T / Pyadomd

A pythonic approach to query SSAS data models.
https://pyadomd.readthedocs.io/en/latest/index.html
Apache License 2.0
25 stars 6 forks source link

No Credentials Available in the Security Package #24

Open miguelTukan opened 1 year ago

miguelTukan commented 1 year ago

Hi,

I'm trying to connect to an open OLAP database. I have already installed the ADOMD client for Windows and haven't been able to connect succesfully.

The code I'm using is:

from sys import path
path.append("C:\\Program Files\Microsoft.NET\\ADOMD.NET\\160")

conn_str = 'Provider=MSOLAP;Password=Temp123!;User ID=DGIS15;Initial Catalog=Cubo solo sinba 2023;Data Source=pwidgis03.salud.gob.mx'

Pyadomd(conn_str).open()

where I get the following error

AdomdConnectionException: Authentication failed. ---> System.ComponentModel.Win32Exception: No credentials are available in the security package
   at Microsoft.AnalysisServices.AdomdClient.Sspi.SspiHelper.InitializeSecurityContext(SecHandle credentialHandle, SecHandle& contextHandle, String targetName, SecurityContextRequirements requirements, SecurityDataRepresentation targetDataRepresentation, SecurityBuffer[] input, SecurityBuffer[] output, SecurityContextRequirements& attributies)
   at Microsoft.AnalysisServices.AdomdClient.Sspi.NTAuthenticationSession.GetNextOutgoingToken(Byte[] incomingToken)
...
   at Microsoft.AnalysisServices.AdomdClient.XmlaClient.OpenConnection(ConnectionInfo connectionInfo, Boolean& isSessionTokenNeeded)
   at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
   at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Connect()
   at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)
   at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()

I have been able to succesfully connect to the database via Excel. Any ideas on what I could do?

These are open OLAP cubes supplied by the Mexican government, which is why I've supplied the credentials.