Here is the code:
for(User u : usrList){
usersRecordToUpdateId.add(u.id);
if(!usersRecordToUpdateId.isEmpty()){
Map<Id, List<String>> esfgroup = new Map<Id, List<String>>();
List<String> newgrouplist = new List<String>();
List<GroupMember> groupMemberRecList = [select id, GroupId, Group.Name, UserOrGroupId, Group.developerName from GroupMember where UserOrGroupId in :usersRecordToUpdateId WITH SECURITY_ENFORCED LIMIT 1];
and I getting error while I am querying in groupMemberRecList
Can someone suggest how to resolve it.