How to setup CAFE to work with SSO and TM1

Product:
IBM Cognos TM1 10.2.2
Microsoft Windows 2008 R2 Server

Problem:
How to setup CAFE to work with SSO and TM1.

Download Cognos CAFE from here
http://www-01.ibm.com/support/docview.wss?uid=swg24036964

Download the latest Service pack from here
http://www-01.ibm.com/support/docview.wss?uid=swg24041748
You can install the CAFE fix pack direct on you workstation.

Solution:
Setup Cognos BI to work with AD login with SSO.
Setup TM1 to work with AD login in the application.

Check to ensure the TM1 cam files are on the BI server;
Logon to the Cognos BI server
Ensure that file \templates\ps\portal\variables_tm1.xml contains the values to point to the TM1 server.

If you have a older version of Cognos BI than of Cognos TM1, then you may need to do this step:
In Windows Explorer, navigate to the following directory: ‘\webapps\pmpsvc\gateway_files\’
Extract the ‘planning_gateway.zip’ file, and copy the ‘/webcontent/pmhub.html’ file from within
In Windows Explorer, navigate to the following directory: ‘\webcontent\’ and paste the copied ‘pmhub.html’ file.

Open pmhub.html in notepad and change to the server name to that of the TM1 server.
(For all SSO to work, you need to update the right files on the Cognos BI server to point to your Cognos TM1 server. Check other instructions to get SSO to work with Cognos TM1)

Setup the values in PMHUB for the CAFE client.
Launch the PMHub via the following URL: http://yourservername.domain.com:9510/pmhub/pm/admin/
On the left hand side, expand ‘com.ibm.ba.pm.resource.security’. Then, click ‘com.ibm.ba.pm.resource.security.dictionary’ to open the properties pane.
In the properties pane on the right hand side, configure any of the server related URIs to match your own.
Exit the PMHub

On the Client computer ensure that Microsoft NET framework 4 is installed, this is needed for CAFE client.
Also ensure that Primary Interop assemblies are installed with Office on the workstation.
To install the PIAs when you install Office;

Ensure that you have a version of the .NET Framework that is no older than 2.0.

Install Microsoft Office and make sure that the .NET Programmability Support feature is selected for the applications you want to extend (this feature is included in the default installation).

Install the CAFE program on the client by running \install\download\cor_win32_10.2.5250.21_ml.tar\win32\issetup.exe
This will install the CAFE program in your Excel installation.

In Microsoft Excel you must allow the plug in, to get it to work.

Run script to update file in folder C:\Users\%username%\AppData\Local\Cognos\Office Connection
The file is CommManagerSettings.xml

Content to change are

<?xml version=”1.0″ encoding=”utf-16″?><Servers><Server Dll=”Framework.Provider.TM1Rest.dll” gateway=”http://donaldduck:9510″ friendlyname=”KALLETM1″ /></Servers>
True
False
False
300
True

Other files in folder are;
COCSettings.xml
CommManagerSettings.xml
Config.xml
FrameworkSettings.xml

Update below script with your name and the setting for SSO, paste it into NOTEPAD on server and save it as CAFEUPDATE.PS1

$path = ‘C:\Users\username\AppData\Local\Cognos\Office Connection\CommManagerSettings.xml’

(
(Get-Content $path )| Foreach-Object { $_ -replace ‘True‘, ‘False‘ } | Set-Content $path
)

You cannot edit the SERVERNAME with above script. Get-Content works only on a row at a time. You need to create something that can search and replace in the whole file.

Here is some help:
http://windowsitpro.com/scripting/replacing-strings-files-using-powershell

You can use any script tool to update the CommManagerSettings.xml file with your company settings. Use the tool you are familiar with.
Good Luck.

Error message in CAFE when you click Login;
error 404 = wrong value in PMHUB, misspelled server name or use of cognos.cgi
If you still have issues, then it may be needed changes in IIS to make SSO to work.

More Information:
http://www.cogknowhow.com/index.php/knowledge-articles/61-ibm-cognos-tm1/585-how-to-setup-sso-against-active-directory-with-tm1-and-cam-security
http://www-01.ibm.com/support/docview.wss?uid=swg27041505#tab_1022FP4
http://www.ibm.com/support/knowledgecenter/SSHM9K_10.2.2/com.ibm.swg.ba.cognos.ig_cxr.10.2.2.doc/c_ug_cor_trblshtng_config_issues.html%23ug_cor_trblshtng_config_issues
https://powershell.org/forums/topic/edit-ini-files/