Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Access Denied executeQueryAsync

$
0
0

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());
}


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>