JSOM not working when user has read permissions RRS feed

  • Question

  • Hi all,

    I have created JavaScript to get all terms from a TermSet. The solution is NOT an app but a usual JavaScript file. The solution is SharePoint Online (Office365) solution. I have shared the site collection with some external users. When external users browse to the site the JavaScript code does not return any Terms (it does not goes to failed callback it just not return anything). here is my code

     var clientContext = new SP.ClientContext.get_current();
     var tSession = SP.Taxonomy.TaxonomySession.getTaxonomySession(clientContext);
    var ts = tSession.getDefaultSiteCollectionTermStore();
    var termSets = ts.getTermSetsByName("MyTermSet", 1033);
    clientContext.executeQueryAsync(Function.createDelegate(this, function (sender, args) {
           var navEnum = termSets.getEnumerator();
           // navEnum is empty when user is reader
       Function.createDelegate(this, function (sender, args) {
           console.log('Följande fel uppstodd när försökte ladda Toppnavigering: ' + args.get_message());

    Thanks and appreciate all kind of advice

    • Edited by Medes71 Friday, March 28, 2014 11:05 AM
    Friday, March 28, 2014 11:03 AM