Matthias,
API based authentication is not available for IA (Mode3). I understand your frustration, seeing as a formula report refresh does not automatically prompt the user to authenticate.
However, a refresh of other reporting modes, such as a Quick Reports, does indeed prompt the user. This prompt would automatically be resolved for Integrated Auth.
A suggested workaround is to create a small Quick Report somewhere in your workbook, connected to the appropriate server, which could automatically be refreshed during workbook open. After this authentication step, formula reports should have the access they need to refresh.
The following code is an example of how the QR Refresh could be called.
Private Sub Workbook_Open()
Reporting.GetCurrentReport(Cells(13, 2)).Refresh
End Sub
------------------------------
MattHopkins
Senior Software Engineer
QueBIT Consulting
------------------------------
Original Message:
Sent: Wed December 02, 2020 11:13 AM
From: Matthias Mazaj
Subject: PAfE automatic logon to TM1 server (Integrated Windows Auth)
Hello,
we are currently trying to migrate from Perspectives to PAfE and we have an issue with integrated login in our planning masks.
Is there a way to automatically log in the user that opens a PAfE workbook (custom report) so that the user doesn't have to manually log in to each TM1 Server?
I've found this bit of code that does the job for security mode 1:
bResult =
CognosOfficeAutomationObject.Logon ("http://pawserver.domain.com", "admin","#####", "pawserver/Planning Sample")
but since we do not store any passwords and want the user to logon with security mode 3 (Integrated Windows Authentication) I cannot parse a password.
Also there are multiple planning masks and multiple TM1 servers we want to create the connection in the Excel "Open" event (the workbook knows which TM1 server is the correct one, the user might not).
How do I do this? Simply leaving the password empty and using the windows user (Unique ID) doesn't work
bResult =
CognosOfficeAutomationObject.Logon ("http://pawserver.domain.com", "USER@DOMAIN", , "pawserver/Planning Sample")
Any suggestions?
Thanks
------------------------------
Matthias Mazaj
------------------------------
#PlanningAnalyticswithWatson