Sites Owners

GCSD-AyeTea
New Contributor II

Is there any way to determine who owns a Google Site in your domain? 

5 REPLIES 5

SteveHarmon
Contributor

Sites are difficult to do this with because there is not a clear way to find the File ID for the file in Drive. What I tend to do is a general search in GAMADV-XTD3 based on the title of the Site or a phrase used in the Site that seems unique:

  1. Search Students OU for a file with 'search_text' in file (I search by OU just to limit the time of the query and the amount of the output, but you can search from the root level if you need to): 
    gam ou /Students print filelist query "fullText contains 'SEARCH_TEXT'" todrive
  2. Once you find the File ID (if you can), then find out who owns that particular file: 
    gam show ownership FILE_ID
  3. Then you can add yourself as editor of a file (this was a bonus! You can change the ownership to yourself by changing "editor" to "owner" at the end of the command): 
    gam user USER_OWNER add drivefileacl FILE_ID user MY_ACCOUNT role editor

Unfortunately, you will have an issue if you cannot find the search_text with first command. I have not figured out a way past that - maybe someone else has a better solution!

As well as Steve's commands you can also use;-

If you think the Site is in Shared (Team) Drives
gam all users show filelist corpora allTeamDrives anyowner showmimetype gsite fields name,id,title,alternateLink,createdDate,description,teamdriveid,teamdrivename todrive

Search All Users MyDrive for Google Sites
gam all users print filelist query "mimeType = 'application/vnd.google-apps.site'" id name mimetype todrive

Kim_Nilsson
Admin Moderator

And I'm pretty sure you should be able to do that same search in the Drive Audit Log. It's always worth a try.

--
https://wheretofind.me/@NoSubstitute

GCSD-AyeTea
New Contributor II

Thank you all!

GCSD-AyeTea
New Contributor II

Kim's solution turned out to be the easiest. 

Investigation Tool>Drive Log Events

Document Type is Google Sites

Title Contains the part after https://sites.google.com/domain/

Then I clicked the 3 dots next to Document ID in the results and selected Audit File Permissions. It showed me who has access, including who the owner is.