0

I have two lists (Red and blue) on the same domain, but can only fetch list items from one of the lists. I can see item count, id etc. of both lists. My app has all rights to Sharepoint

This is my code

ClientContext clientContext = new AuthenticationManager().GetACSAppOnlyContext(siteUrl, clientID, clientSecret);
        
        try
        {
            var oList = clientContext.Web.Lists.GetById(Guid.Parse("*ListGUID*"));
            clientContext.Load(oList);
            clientContext.ExecuteQuery();
            
            ListItemCollection collListItem = oList.GetItems(CamlQuery.CreateAllItemsQuery());
            clientContext.Load(collListItem);
            clientContext.ExecuteQuery();
        }
        catch (Exception ex)
        {
            // Log or output the exception details
            Console.WriteLine(ex.ToString());
        }

Blue count

Blue list

Red list

Red count

App rights

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.