TM1 to python

Post Reply
rdb008
Posts: 1
Joined: Thu Jan 19, 2023 10:35 pm
OLAP Product: tm1
Version: 11.0.00200
Excel Version: 365

TM1 to python

Post by rdb008 »

Hi,

I am trying to connect to TM1 through Python. Mostly we use the Excel Add-on to connect to TM1 PAX but because we are redoing some reports we are trying to get the connection to Python to make things faster.

I am using the basic authentication as mentioned here (https://www.ibm.com/docs/en/cloud-paks/ ... connection), however I get the below error in Python:


TM1pyRestException: Text: '{ "error":"access_denied", "error_description":"Failed to verify OAuth information. Transaction ID=XX" }' - Status Code: 401 - Reason: 'Unauthorized' - Headers: {'Date': 'XX', 'Server': '', 'Strict-Transport-Security': 'max-age=XX; includeSubdomains', 'Content-Type': 'application/json', 'WWW-Authenticate': 'Bearer', 'X-Backside-Transport': 'FAIL FAIL', 'Vary': 'Accept-Encoding', 'Content-Encoding': 'gzip', 'X-Content-Type-Options': 'nosniff', 'Content-Length': '120', 'Keep-Alive': 'timeout=5, max=100', 'Connection': 'Keep-Alive'}


Any help will be appreciated!!
MariusWirtz
Posts: 31
Joined: Sat Apr 08, 2017 8:40 pm
OLAP Product: TM1
Version: 10.2.2.6
Excel Version: 2016

Re: TM1 to python

Post by MariusWirtz »

Hi,

are you connecting to TM1 on-cloud or PA on-premise?
If you are using TM1 on-premise, what IntegratedSecurityMode are you using?

For TM1 on cloud you can use this article as a reference.
https://code.cubewise.com/tm1py-help-co ... with-tm1py
For TM1 on cloud, TM1py needs to authenticate with a non-interactive account.

For TM1 on-premise, you can use this as a reference.
https://code.cubewise.com/tm1py-help-co ... with-tm1py
Post Reply