how often does the letter "-" occur in:
q: fetch all places (lists/libraries/items) where permissions are given to 'everyone' group i am working on office 365 sharepoint site.
i want to fetch all lists/libraries/items where permissions are given to everyone group across sharepoint site using csom.
    web web = context.web;
var lists = context.web.lists;
context.load(lists);
context.executequery();
foreach (var list in lists)
{
    context.load(list.roleassignments);
    context.executequery();
    foreach (var roleassignment in list.roleassignments)
    {
        context.load(roleassignment.member);
        context.executequery();
        var everyoneexceptexternalusers = " c:0-.f|rolemanager|spo-grid-all-users/526bf739-e2f7-4c87-a8ce-0737198cc796";
        principaltype sharepointgroup = default(principaltype);
        if (roleassignment.member.principaltype == sharepointgroup && roleassignment.member.loginname == everyoneexceptexternalusers) {
            console.writeline(list.title, "has everyone group");

        }
        else
        {
            console.writeline("everyone group is not present in the list");
        }
        console.readline();
    }
}


a: to achieve your requirement, there is a powershell script for your reference.
    #load sharepoint csom assemblies
add-type -path "c:\program files\common files\microsoft shared\web server extensions\16\isapi\microsoft.sharepoint.client.dll"

add-type -path "c:\program files\common files\microsoft shared\web server extensions\16\isapi\microsoft.sharepoint.client.runtime.dll"
#variables for processing
$siteurl = "https://tenantname.sharepoint.com/sites/sitename"
$username="username"
$password ="password"

#setup credentials to connect

$credentials = new-object microsoft.sharepoint.client.sharepointonlinecredentials($username,(convertto-securestring $password -asplaintext -force))


    $context = new-object microsoft.sharepoint.client.clientcontext($siteurl) 

    $context.credentials = $credentials


    #sharepoint online powershell get all lists

    $lists = $context.web.lists

    $context.load($lists)

    $context.executequery()



    #iterate through each list in a site   

    foreach($list in $lists)
    {

        $context.load($list.roleassignments)
        $context.executequery()
        foreach($roleassignment in $list.roleassignments)
        { 
               $context.load($roleassignment.member)

               $context.executequery()

               if($roleassignment.member.principaltype -eq "sharepointgroup" -and $roleassignment.member.loginname -eq "everyone"){

                    write-host $list.title "has everyone group"

                } 

        }




    }   

more reference:
sharepoint online: site collection permissions report using powershell.

a:  web web = context.web;
                var lists = context.web.lists;
                context.load(lists);
                context.executequery();
                foreach (var list in lists)
                {
                    context.load(list.roleassignments);
                    context.executequery();
                    console.writeline(list.title);
                    if (list.title.startswith("employee"))
                    {
                        foreach (var roleassignment in list.roleassignments)
                        {
                            context.load(roleassignment.member, r => r.loginname, r => r.principaltype);
                            context.executequery();
                            var everyoneexceptexternalusers = "c:0-.f|rolemanager|spo-grid-all-users/526bf739-e2f7-4c87-a8ce-0737198cc796";
                            //principaltype sharepointgroup = default(principaltype);
                            if (roleassignment.member.loginname == everyoneexceptexternalusers)//roleassignment.member.principaltype == sharepointgroup && 
                            {
                                console.writeline(list.title, "has everyone group");
                            }
                            else
                            {
                                console.writeline("everyone group is not present in the list");
                            }
                        }
                    }
                    console.readline();
                }


user
The given text has 29 "-"s.
assistant