154: TM1 API DOTNET Exception: -failed to create client cred
-
- Community Contributor
- Posts: 139
- Joined: Mon Sep 15, 2008 1:45 pm
154: TM1 API DOTNET Exception: -failed to create client cred
Hi all,
I wonder whether someone has some advice on this?
I have setup TM1 v 9.5.1 including TM1 web using integrated login.
Using the normal clients (architect / perspectives) everything works fine.
Using the web it all works fine as long as I am logged in to the server. (I.e. if I control the server over RD and then go to localhost/tm1web) it will log me in aso... no problems.
When trying to connect from another machine though, the normal clients work, but with TM1Web I get the message above when trying to log in.
Everything is in the same domain.
Anyone have any idea on where to start looking? The settings that are specified in the web config in order to enable integrated login have been set and so have the two IIS settings that are mentioned in there.
Thanks for any advice,
Jeroen
I wonder whether someone has some advice on this?
I have setup TM1 v 9.5.1 including TM1 web using integrated login.
Using the normal clients (architect / perspectives) everything works fine.
Using the web it all works fine as long as I am logged in to the server. (I.e. if I control the server over RD and then go to localhost/tm1web) it will log me in aso... no problems.
When trying to connect from another machine though, the normal clients work, but with TM1Web I get the message above when trying to log in.
Everything is in the same domain.
Anyone have any idea on where to start looking? The settings that are specified in the web config in order to enable integrated login have been set and so have the two IIS settings that are mentioned in there.
Thanks for any advice,
Jeroen
Re: 154: TM1 API DOTNET Exception: -failed to create client
Have you added the the webserver as a site in IE security options for the machines? Sometimes that does works for me:
IE browser, Tools, Internet Options, Security tab. Advanced, Sites.
Add the http://server to the Local Intranet sites
(sometimes credentials get stripped away when browsing to webserver)
IE browser, Tools, Internet Options, Security tab. Advanced, Sites.
Add the http://server to the Local Intranet sites
(sometimes credentials get stripped away when browsing to webserver)
-
- Community Contributor
- Posts: 139
- Joined: Mon Sep 15, 2008 1:45 pm
Re: 154: TM1 API DOTNET Exception: -failed to create client
I managed to resolve the problem - In case anyone ever encounters it I'll detail below.
Apparently it is due to some conflicting SPN's (Service Principal Names). Unfortunately my knowledge of these kind of things is very limited and my interest in these kind of things is less than limited
On the upside however an alternative way to solve it (instead of dealing with the SPN's) was switch the security protocol in the TM1 config file to NTLM instead of Kerberos. It works fine after doing that.
Apparently it is due to some conflicting SPN's (Service Principal Names). Unfortunately my knowledge of these kind of things is very limited and my interest in these kind of things is less than limited

On the upside however an alternative way to solve it (instead of dealing with the SPN's) was switch the security protocol in the TM1 config file to NTLM instead of Kerberos. It works fine after doing that.
Re: 154: TM1 API DOTNET Exception: -failed to create client
TM1APIDOTNET Exception: - CAM security is required to login to server:
This is the code which i am using to Login to TM1server using C#.Net.
protected int tm1Main()
{
String adminHost, tm1Svr, tm1Uid, tm1Pwd;
adminHost = "INFPWH0040";
tm1Svr = "developer";
tm1Uid = "xxx";
tm1Pwd = "xx";
int nRtn = 0;
// Start by creating an Admin Server object
TM1AdminServer admin = new TM1AdminServer(adminHost, "tm1adminserver");
try
{
//admin.Servers[tm1Svr].GetCAMLoginEnabled(tm1Svr);
// Obtain "sdata" server info object and then login
TM1Server server = admin.Servers[tm1Svr].Login(tm1Uid, tm1Pwd); //server.Processes.Count
if (server != null)
{
// Start using database server
TM1CubeCollection cubes = server.Cubes;
//Label1.Text = "Number of cubes: " + cubes.Count;
foreach (TM1Cube cube in cubes)
{
//ListBox1.Items.Add(cube.Name);
}
}
else
{
// Handle failure to login
nRtn = -1;
}
}
catch (Exception exc)
{
// Handle exception
nRtn = -2;
}
// We're done with all database servers and the Admin Server object
admin.LogoutAll();
admin.Dispose();
return nRtn;
}
previously this was running when the Integrationmode = 1 and now when the integrationmode is changed to 4. it is giving the above error..
This is the code which i am using to Login to TM1server using C#.Net.
protected int tm1Main()
{
String adminHost, tm1Svr, tm1Uid, tm1Pwd;
adminHost = "INFPWH0040";
tm1Svr = "developer";
tm1Uid = "xxx";
tm1Pwd = "xx";
int nRtn = 0;
// Start by creating an Admin Server object
TM1AdminServer admin = new TM1AdminServer(adminHost, "tm1adminserver");
try
{
//admin.Servers[tm1Svr].GetCAMLoginEnabled(tm1Svr);
// Obtain "sdata" server info object and then login
TM1Server server = admin.Servers[tm1Svr].Login(tm1Uid, tm1Pwd); //server.Processes.Count
if (server != null)
{
// Start using database server
TM1CubeCollection cubes = server.Cubes;
//Label1.Text = "Number of cubes: " + cubes.Count;
foreach (TM1Cube cube in cubes)
{
//ListBox1.Items.Add(cube.Name);
}
}
else
{
// Handle failure to login
nRtn = -1;
}
}
catch (Exception exc)
{
// Handle exception
nRtn = -2;
}
// We're done with all database servers and the Admin Server object
admin.LogoutAll();
admin.Dispose();
return nRtn;
}
previously this was running when the Integrationmode = 1 and now when the integrationmode is changed to 4. it is giving the above error..
-
- Posts: 5
- Joined: Mon Apr 08, 2013 6:37 am
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: -
Re: 154: TM1 API DOTNET Exception: -failed to create client
Have you resolved your problem?
I met the same issue yesterday but unfortunately can't find proper solution.
IntegratedSecurityMode is set to 5 and can't be changed due to security restrictions.
So when I try this code:
It gives me "CAM security is required to login to server" exception,
but when I change it to
it tells "Either the login name or the password is incorrect"
although I'm using the same credentials to connect via Architect / TM1 Web.
What could be the reason?
I met the same issue yesterday but unfortunately can't find proper solution.
IntegratedSecurityMode is set to 5 and can't be changed due to security restrictions.
So when I try this code:
Code: Select all
TM1AdminServer admin = new TM1AdminServer(hostName, "tm1adminserver");
admin.Servers[serverName].Login(userName, password);
but when I change it to
Code: Select all
TM1AdminServer admin = new TM1AdminServer(hostName, "tm1adminserver");
admin.Servers[serverName].LoginUsingCAMNamespace(namespace, userName, password);
although I'm using the same credentials to connect via Architect / TM1 Web.
What could be the reason?
-
- MVP
- Posts: 1828
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: 154: TM1 API DOTNET Exception: -failed to create client
mike_pvs wrote:it tells "Either the login name or the password is incorrect"Code: Select all
TM1AdminServer admin = new TM1AdminServer(hostName, "tm1adminserver"); admin.Servers[serverName].LoginUsingCAMNamespace(namespace, userName, password);
although I'm using the same credentials to connect via Architect / TM1 Web.
What could be the reason?
I tend not to use CAM so I could be sending you in completely the wrong direction but I believe that the username you enter and what gets resolved are slightly differently e.g. a user of John.Smith actually comes through as something along the lines of CAMID("John.Smith")... I can't remember the exact format but will see if I can find/remember it.
Edit - Possibly remembered it to be CAMID("Server:UserName") e.g. CAMID("Prod:John.Smith")
This had to be used to connect to the CXMD service in Framework Manager for Cognos Express set up with CAM logons anyway so it's a completely different scenario but doesn't hurt to try.
Declan Rodger
-
- Posts: 5
- Joined: Mon Apr 08, 2013 6:37 am
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: -
Re: 154: TM1 API DOTNET Exception: -failed to create client
Thanks a lot for suggestion!
Here is what I have tried (unfortunately without luck, will try more later):
Is it what you've suggested? Do you know by any chance where I can get any documentation regarding this?
Here is what I have tried (unfortunately without luck, will try more later):
Code: Select all
LoginUsingCAMNamespace("Active Directory", "CAMID(\"Server_Test:USR\")", "Password");
LoginUsingCAMNamespace("Active Directory", "CAMID(Server_Test:USR)", "Password");
LoginUsingCAMNamespace("Active Directory", "CAMID(\"USR\")", "Password");
LoginUsingCAMNamespace("Active Directory", "CAMID(USR)", "Password");
LoginUsingCAMNamespace("Active Directory", "CAMID(\"AD:u:497280c0b11b2e41b9c616b70b1d738e\")", "Password");
LoginUsingCAMNamespace("Active Directory", "CAMID(AD:u:497280c0b11b2e41b9c616b70b1d738e)", "Password");
-
- Posts: 5
- Joined: Mon Apr 08, 2013 6:37 am
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: -
Re: 154: TM1 API DOTNET Exception: -failed to create client
Could anyone share *.chm with documentation for TM1 .Net API? It is not installed on the server and I can't find it online.
-
- Posts: 5
- Joined: Mon Apr 08, 2013 6:37 am
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: -
Re: 154: TM1 API DOTNET Exception: -failed to create client
Finally I was able to connect TM1. The correct code is:
where USER is normal user name (like "John Smith"), PASSWORD is normal password, but NAMESPACE is the tricky one.
When I log in using Architect and Cognos login form, namespace is displayed as "Active Directory", but for successful login in my case it should be "AD".
I got this abbreviation from status bar of Clients/Group security window where current user was displayed in the next form:
Server:SERVER Client:CAMID("AD:u:497280c0b11b2e41b9c616b70b1d738e")
Code: Select all
admin.Servers["SERVER"].LoginUsingCAMNamespace("NAMESPACE", "USER", "PASSWORD");
When I log in using Architect and Cognos login form, namespace is displayed as "Active Directory", but for successful login in my case it should be "AD".
I got this abbreviation from status bar of Clients/Group security window where current user was displayed in the next form:
Server:SERVER Client:CAMID("AD:u:497280c0b11b2e41b9c616b70b1d738e")