1

I have a CSOM query like this one:

_context.Load(currentItems,
   lis => lis.Include(
          i => i.RoleAssignments.Include(
               ra => ra.RoleDefinitionBindings,
               ra => ra.RoleDefinitionBindings.Include(
                     rdb => rdb.Name
                     ).Where(
                     rdb => rdb.Name != "Limited Access"
                     )
               ).Where(
               ra => ra.Member.LoginName.StartsWith("SharingLink"))
               )
  );

I want to load all items that, in their RoleAssignments, the Member LoginName starts with "SharinLink" text. This is however not possible because CSOM cannot use StartsWith function.

There is also the option of using the BeginsWith from a CAML query. However, I don't know how to tell the query that it needs to use a ListItem.RoleAssignments.Member.LoginName property. Is this possible? Considering there are various RoleAssignments per ListItem.

Thanks in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.