You need to sign in to do that
Don't have an account?
asadim
URGENT: Cannot login to clients using Office Toolkit
Hi,
I'm using the Sforce Office Toolkit and I get the following error when I try logging into a client's system:
INVALID_LOGIN: Invalid username, password, security token; or user locked out.
I can login to our developer accounts just fine -it's only the clients that don't work. The credentials that I'm using are 100% correct.
Any ideas?
An intersting update! I'll just let the code speak for itself:
I can login to user XYZ like this just fine:
string user = "XYZ";
string pass = "XYZpasstoken";
try
{
bool l = _sfapi.Login(user, pass);
if (!l) MessageBox.Show(_sfapi.ErrorMessage);
else MessageBox.Show("yay");
}
catch (Exception e) { MessageBox.Show(e.Message); }
string user = "ABC";
string pass = "ABCpasstoken";
try
{
bool l = _sfapi.Login(user, pass);
if (!l) MessageBox.Show(_sfapi.ErrorMessage);
else MessageBox.Show("yay");
}
catch (Exception e) { MessageBox.Show(e.Message); }
user = "XYZ";
pass = "XYZpasstoken";
try
{
bool l = _sfapi.Login(user, pass);
if (!l) MessageBox.Show(_sfapi.ErrorMessage);
else MessageBox.Show("yay");
}
catch (Exception e) { MessageBox.Show(e.Message); }
The second login attempt fails with the same message as what I had in my initial post.
Strange eh?!
FINAL UPDATE: Re-initializing _sfapi right before re-logging in with XYZ solved the issue!!
All Answers
Hi, yes I'm using password+token to login like this:
bool isLoggedIn = _sfapi.Login(user, passtoken);
I'm not sure about the token being unique to the machine because I can login to the client's account through the Eclipse plugin using the same password and token. Not only that, I can also login to the client's system thru the DataLoader.
I really hope you're right tho! Maybe the Eclipse plugin or the DataLoader does some weird stuff behind the curtains. Unfortunately I cannot test this over the weekend and I need to at least have an answer by Monday!!
Thanks alot Rick for helping out!
Thanks -even if your idea seems to throw me off track I still appreciate it. Better to discuss than being completely clueless!
Btw I just did another test and here's the result: I managed to login with a client account last night from my home computer but I can't login with it on any of the work machines. So I think the region-specific hypothesis is not valid.
Thanks again for trying to help out. Please do respond if you happen to have other thoughts.
An intersting update! I'll just let the code speak for itself:
I can login to user XYZ like this just fine:
string user = "XYZ";
string pass = "XYZpasstoken";
try
{
bool l = _sfapi.Login(user, pass);
if (!l) MessageBox.Show(_sfapi.ErrorMessage);
else MessageBox.Show("yay");
}
catch (Exception e) { MessageBox.Show(e.Message); }
string user = "ABC";
string pass = "ABCpasstoken";
try
{
bool l = _sfapi.Login(user, pass);
if (!l) MessageBox.Show(_sfapi.ErrorMessage);
else MessageBox.Show("yay");
}
catch (Exception e) { MessageBox.Show(e.Message); }
user = "XYZ";
pass = "XYZpasstoken";
try
{
bool l = _sfapi.Login(user, pass);
if (!l) MessageBox.Show(_sfapi.ErrorMessage);
else MessageBox.Show("yay");
}
catch (Exception e) { MessageBox.Show(e.Message); }
The second login attempt fails with the same message as what I had in my initial post.
Strange eh?!
FINAL UPDATE: Re-initializing _sfapi right before re-logging in with XYZ solved the issue!!