Page 1 of 1
How to use N_Connect with Cognos 8 Security?
Posted: Wed Mar 09, 2011 6:04 pm
by mce
Hi,
When I use IntegratedSecurityMode = 5, how can I use N_Connect in Excel macro?
Where to indicate the namespace?
Is it as part of user name like Run("n_connect", TM1Server, "namespace\user", Password)? This did not work for me.
Thanks for any help.
Regards,
Re: How to use N_Connect with Cognos 8 Security?
Posted: Wed Mar 09, 2011 8:56 pm
by tomok
mce wrote:When I use IntegratedSecurityMode = 5, how can I use N_Connect in Excel macro?
Good luck with this. I've never really had a desire to do this so I gave it a shot for kicks and grins. It doesn't work. I tried leaving the ID and password out and it doesn't work. So, I tried adding the TM1 CAMID (the actual client name that it adds for you in TM1, still doesn't work. Then I tried with the full CAMID and password. No go. If I were you I would drop the idea of an automated login, especially if you are using C8 security.
Re: How to use N_Connect with Cognos 8 Security?
Posted: Thu Mar 10, 2011 5:33 pm
by mce
N_Connect with Cognos 8 Security is not supported, as per documentation.
Re: How to use N_Connect with Cognos 8 Security?
Posted: Mon Sep 26, 2011 3:07 am
by jameswebber
Hi MCE,
I see that as per this document
http://publib.boulder.ibm.com/infocente ... f_NConnect
But is there a workaround to get users to logon without going into server explorer (front end)?
Re: How to use N_Connect with Cognos 8 Security?
Posted: Mon Sep 26, 2011 5:58 am
by rmackenzie
Hi James, I don't believe there is a work-around. It looks like you will have to adjust your VBA logic to suit the login constraints... why do you need the login to be automated?
N_CONNECT has always been a bit dodgy really, as you have to hard-code the password into the code. I guess this is OK in some circumstances, but in others it most certainly isn't.
Re: How to use N_Connect with Cognos 8 Security?
Posted: Mon Sep 26, 2011 7:04 am
by rmackenzie
PS I am reliably informed that N_CONNECT will work where Integrated Login Mode is 2 (or 3 as well, I guess) but as the document states, this is not supported.
Re: How to use N_Connect with Cognos 8 Security?
Posted: Mon Sep 26, 2011 8:32 am
by jameswebber
Thanks rmackenzie,
We have logons based on team name rather than individuals so the integrated option does work for us.
The users current have a excel front end with a logon button that opens a VBA form taking their logon/password and supplying it to N_Connect to logon.
This works in logon mode 1 and 2 but not 4 or 5 with CAM users. I figured other people must want users to connect via an excel front end or does everyone just used integrated logon?
Re: How to use N_Connect with Cognos 8 Security?
Posted: Tue Sep 27, 2011 12:24 am
by rmackenzie
One of the general ideas with TM1/ Cognos integration (and thus CAM security) was to introduce and popularize usage of front-ends other than Excel, e.g. Report Studio and TM1 Contributor etc. I guess that on the way there, IBM didn't think to go back and make sure stuff like N_CONNECT was kept up-to-date with this. They have updated some of the other APIs but the VBA API has always been a bit of a odd-man-out.
I guess it isn't going to kill your users to have to logon to TM1 via the command-bar and then use the application although I would agree it might detract from the 'seamless' application experience you might have...
Re: How to use N_Connect with Cognos 8 Security?
Posted: Tue Sep 27, 2011 2:59 am
by jameswebber
Mate you don't know my users
There is actually a command called NET_CONN
Run ("NET_CONN")
But then the user must put the client ID and password frist (before choosing the server ID)

- NET_CONN.gif (11.36 KiB) Viewed 5897 times
However the user would still need to authenticate with the CAM screen

- CAM_logon.gif (66.61 KiB) Viewed 5897 times
Ideally I would like to invoke this final screen or pass the user ID and password to both of these via a VBA screen.
Re: How to use N_Connect with Cognos 8 Security?
Posted: Mon Oct 03, 2011 2:01 am
by jameswebber
So sadly it seems that there is no good work around for this.
I can call the server explorer using this code
Code: Select all
'Call the xcelertator server explorer
Application.Run "TM1StartOrionWithAutomation"
'Expand and click on CXMD to force SE to pop logon
' This is wrapped with script due to UAC controls in vista/windows 7
' (and yes it took me a long time to figure this out)
CreateObject("WScript.Shell").SendKeys "{RIGHT}", True
CreateObject("WScript.Shell").SendKeys "{RIGHT}", True
CreateObject("WScript.Shell").SendKeys "{ENTER}", True
But this only works on the first logon attempt as CE seems to cache logons even after executing Run ("N_DISCONNECT").
I cannot interact with the NET_CONN dialogue in the same way.
I'm going to raise with our IBM support partner but I think the answer will be use NET_CONN and give the user 2 dialogue logons to navigate.