2 added 111 characters in body
source | link

Here's something to start with in C#:

ctx$lists = $ctx.Web.Lists
$ctx.Load($Lists)
$ctx.ExecuteQuery()

foreach($list in $lists) {  ctx.Web.Lists,  
    collection$ras =>= $list.RoleAssignments
    $ctx.Load($ras)
    collection$ctx.IncludeExecuteQuery()
    foreach($ra in $ras) {     list => list.RoleAssignments.Include( assignment 
 => assignment.PrincipalId ) )    $ctx.Load($ra);
ctx        $ctx.ExecuteQuery();
foreach ( var ra in ctx.Web.Lists.Select( list => list.RoleAssignments.GetByPrincipalId(if everyoneUser($ra.Id )PrincipalId )-eq $everoneUserId) {
    ra        $ra.DeleteObject();
    ctx        $ctx.ExecuteQuery();
        }
    }
}

You might not need to includeThat should do the assignmentjob.PrincipalId in the load It's been awhile since I've used PowerShell, so there might be some issues.

Here's something to start with in C#:

ctx.Load(
    ctx.Web.Lists,
    collection =>
        collection.Include(
            list => list.RoleAssignments.Include( assignment => assignment.PrincipalId ) ) );
ctx.ExecuteQuery();
foreach ( var ra in ctx.Web.Lists.Select( list => list.RoleAssignments.GetByPrincipalId( everyoneUser.Id ) ) ) {
    ra.DeleteObject();
    ctx.ExecuteQuery();
}

You might not need to include the assignment.PrincipalId in the load.

Here's something to start with in C#:

$lists = $ctx.Web.Lists
$ctx.Load($Lists)
$ctx.ExecuteQuery()

foreach($list in $lists) {    
    $ras = $list.RoleAssignments
    $ctx.Load($ras)
    $ctx.ExecuteQuery()
    foreach($ra in $ras) {         
        $ctx.Load($ra)
        $ctx.ExecuteQuery()
        if ($ra.PrincipalId -eq $everoneUserId) {
            $ra.DeleteObject();
            $ctx.ExecuteQuery();
        }
    }
}

That should do the job. It's been awhile since I've used PowerShell, so there might be some issues.

1
source | link

Here's something to start with in C#:

ctx.Load(
    ctx.Web.Lists,
    collection =>
        collection.Include(
            list => list.RoleAssignments.Include( assignment => assignment.PrincipalId ) ) );
ctx.ExecuteQuery();
foreach ( var ra in ctx.Web.Lists.Select( list => list.RoleAssignments.GetByPrincipalId( everyoneUser.Id ) ) ) {
    ra.DeleteObject();
    ctx.ExecuteQuery();
}

You might not need to include the assignment.PrincipalId in the load.