How to remove the “Anyone in domain with link” sharing flag on all files in your G Suite domain
For this use-case, apply filter and search for Anyone in domain with link.
Open Drive then click on Apply custom filter
Set the Type to Files by user status and select Suspended as No and Deleted as No.
This is to exclude the Suspended users as Google blocks any access to suspended accounts therefore you cannot change permissions on their files.
Under the definition, select the Sharing flag contains Anyone in domain with link then click Apply.
When the result is found, select all the files (click beside Title), and you can also view all the files found as a result (Show stats for current filter).
Click on the File operations button and select File management
In File management, select Remove tab and add ( mydomain.com with link ) as in the screen below. Replace mydomain.com with your domain name.
Note: if you have subdomain, you can add ( mydomain.com with link, mydomain2.com with link )
You can write it either as mydomain.com with link or mydomain.com (with link) both ways are valid.
Click on Next and in Summary, you should see – the changes that you will request – click on Send request.
When approved the request will take place and the changes will be performed, the Sharing permission of Anyone in domain with link will be removed.
Check the progress in the Admin log. Or in the Security officer section under the File management tab.
Life and Technology enthusiast