I am getting random access denied error while I run following JS script. Some time the script runs successfully but most of the time is gives an access denied error. I am logged in using windows auth and have full rights
Please help
function sharePointReady() {
clientContext = new SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
this.collList = oWebsite.get_lists();
clientContext.load(collList);
clientContext.executeQueryAsync(
onRequestSucceeded,
onRequestFailed
);
}
function onRequestSucceeded() {
alert("Success");
}
function onRequestFailed(sender, args) {
alert('Error: ' + args.get_message());
}