+ Start a Discussion

sforceClient.login fails with 'permission denied' error message

can someone please explain why this login call fails with 'permission denied' message? i am using IE 6.0 browser. I got same message with FF 1.0.3
<script src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js?broswer=true" type="text/javascript">
<script language="JavaScript">
sforceClient.init(null, null, true);
var username = "admin@xyz.com";
var password = "testing";

alert(sforceClient.login(username, password));

Gareth DaviesGareth Davies

try removing the sforceClient.init call.

I use that call when initialising a session using an Session and API endpoint. I am not sure how well that will play together with the login call.


I'm being cheeky here, but what happens if you spell "browser" correctly on the sforceClient script directive?  :-)

Steve Bower

I fixed it by enabling 'Access data sources across domains' option in IE Tools\Internet Options\Security\Custome level.
I had the same problem, which I fixed in IE by using your solution, but I can't find a similar workaround in Firefox.  Have you found one?  Thanks.