How to use N_Connect with Cognos 8 Security?
- mce
- Community Contributor
- Posts: 352
- Joined: Tue Jul 20, 2010 5:01 pm
- OLAP Product: Cognos TM1
- Version: Planning Analytics Local 2.0.x
- Excel Version: 2013 2016
- Location: Istanbul, Turkey
How to use N_Connect with Cognos 8 Security?
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,
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,
-
- MVP
- Posts: 2836
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: How to use N_Connect with Cognos 8 Security?
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.mce wrote:When I use IntegratedSecurityMode = 5, how can I use N_Connect in Excel macro?
- mce
- Community Contributor
- Posts: 352
- Joined: Tue Jul 20, 2010 5:01 pm
- OLAP Product: Cognos TM1
- Version: Planning Analytics Local 2.0.x
- Excel Version: 2013 2016
- Location: Istanbul, Turkey
Re: How to use N_Connect with Cognos 8 Security?
N_Connect with Cognos 8 Security is not supported, as per documentation.
- jameswebber
- Community Contributor
- Posts: 188
- Joined: Sun Nov 21, 2010 8:00 pm
- OLAP Product: Cognos Express 10
- Version: CE 10.1.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: How to use N_Connect with Cognos 8 Security?
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)?
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)?
-
- MVP
- Posts: 733
- Joined: Wed May 14, 2008 11:06 pm
Re: How to use N_Connect with Cognos 8 Security?
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.
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.
Robin Mackenzie
-
- MVP
- Posts: 733
- Joined: Wed May 14, 2008 11:06 pm
Re: How to use N_Connect with Cognos 8 Security?
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.
Robin Mackenzie
- jameswebber
- Community Contributor
- Posts: 188
- Joined: Sun Nov 21, 2010 8:00 pm
- OLAP Product: Cognos Express 10
- Version: CE 10.1.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: How to use N_Connect with Cognos 8 Security?
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?
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?
-
- MVP
- Posts: 733
- Joined: Wed May 14, 2008 11:06 pm
Re: How to use N_Connect with Cognos 8 Security?
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...
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...
Robin Mackenzie
- jameswebber
- Community Contributor
- Posts: 188
- Joined: Sun Nov 21, 2010 8:00 pm
- OLAP Product: Cognos Express 10
- Version: CE 10.1.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: How to use N_Connect with Cognos 8 Security?
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) However the user would still need to authenticate with the CAM screen Ideally I would like to invoke this final screen or pass the user ID and password to both of these via a VBA screen.

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) However the user would still need to authenticate with the CAM screen Ideally I would like to invoke this final screen or pass the user ID and password to both of these via a VBA screen.
- jameswebber
- Community Contributor
- Posts: 188
- Joined: Sun Nov 21, 2010 8:00 pm
- OLAP Product: Cognos Express 10
- Version: CE 10.1.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: How to use N_Connect with Cognos 8 Security?
So sadly it seems that there is no good work around for this.
I can call the server explorer using this code
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.

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
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.