Is it possible to get Google Site Published URL from file ID

118 views
Skip to first unread message

Alex Cooper

unread,
Mar 28, 2023, 5:21:51 PM3/28/23
to GAM for Google Workspace
Hi,

Thanks Ross and Jay for your awesome work you've done on gam xtd3 :)
I'm trying to audit the Google Sites in our domain.  I can get a list of google sites in our domain using gam user us...@domain.com print filelist showmimetype gsite fields id,name,mimetype,webViewLink filepath - however I'm not sure if it's possible to get the published url (e.g https://sites.google.com/domain.com/wibble) of a given site from the id of a file? The webViewLink field only gives https://sites.google.com/d/fileid/edit

Many thanks

Alex

Ross Scroggs

unread,
Mar 28, 2023, 5:53:13 PM3/28/23
to google-ap...@googlegroups.com
Alex,

Send me a Meet/Zoom invitation.

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/47682d80-326b-4114-80ef-6a778bc8d1a7n%40googlegroups.com.


--

Ross Scroggs

unread,
Mar 28, 2023, 5:55:18 PM3/28/23
to google-ap...@googlegroups.com
Alex,

The Drive API doesn't return that data.

Ross

On Tue, Mar 28, 2023 at 2:21 PM 'Alex Cooper' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:
--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/47682d80-326b-4114-80ef-6a778bc8d1a7n%40googlegroups.com.


--

Matthew

unread,
Mar 29, 2023, 4:01:15 AM3/29/23
to GAM for Google Workspace
Coincidentally, I answered this very question today on StackOverflow.

Ross's short answer is 100% accurate but if you're determined (or bored) I provided one possible workaround. The short version is:
  1. Create an "Auditor" group (GAM)
  2. Give the Auditor group edit access to all the sites in the domain (GAM)
  3. Inspect all the sites manually (if there's not too many) or automatically (using RPA or browser automation software) to get the published URL
  4. Delete the Auditor group (GAM)
Item 3 is deliberately vague and hand-wavy.

For much more detail and a few tips refer to my answer there.

Matt

P.S. This information will become out of date the moment someone goes in and updates the published URL.

Reply all
Reply to author
Forward
0 new messages