In July of this year, Google finally made Gemini Log Events available in Reports API, (see Feature Request from last year) which allows administrators to analyze Gemini usage within the organization. This, of course is easily retrievable using Google Apps Manager (GAM)
# Report Gemini Activities from Past months for all users and write to a Google Sheet
gam report gemini previousmonths 1 todrive
In August of this year, Google made Gemini Logs available in BigQuery Export as well, which allows organizations to retain the logs for longer than 180 days.
You can write a SQL query and create a view that would filter the events in the activity table that would allow further analyses and visualization using Google Sheets or Looker Studio.
SELECT
-- Converts the microsecond timestamp to the date in Eastern Time
DATE(TIMESTAMP_MICROS(time_usec), "America/Toronto") AS event_date_et,
email,
gemini_for_workspace.*
FROM
`{project-id}.{dataset-id}.activity`
WHERE
TIMESTAMP_TRUNC(_PARTITIONTIME, DAY) > TIMESTAMP("2025-08-01")
AND gemini_for_workspace.app_name IS NOT NULL
order by 1 desc
In September of this year, Google finally made Gem sharing available, which creates a folder called Gemini Gems in a user’s Drive. Each Gem, stored in Google Drive, behaves much like other Google Drive files (can be copied and shared), meaning it can be retrieved and managed using GAM.
# Show Shared Gems belonging to a user
gam user $username show filelist query "mimeType='application/vnd.google-gemini.gem'"# Print list of all Shared Gems belonging to All the users and their permissions
gam config auto_batch_min 1 redirect csv - multiprocess todrive all users_ns_susp print filelist query "mimeType='application/vnd.google-gemini.gem'" fields id,name,basicpermissions oneitemperrow
If you have BigQuery Drive Inventory Export configured, you can also use SQL.
SELECT
id,
owner.user.email,
title,
mime_type,
access.permissions
FROM
`{gcp-project-id}.{dataset-id}.inventory`
WHERE mime_type = "application/vnd.google-gemini.gem"
Since Shared Gems are now stored in Google Drive, Data Transfer API should allow it to be transferred to a new owner. If not, it is possible to update ownership using Drive API.
# Share Gem with Editor access
gam user $oldOwner add drivefileacl $driveFileId user $newOwner role writer# Update Editor to Owner permission
gam user $oldOwner update drivefileacl $driveFileId $newOwner role owner
I hope that this would help administrators unlock valuable insight in terms of understanding how users are using Gemini and creating and sharing Gems with other users.
I wish Google would bring a similar capability to NotebookLM, which currently only seems possible with NotebookLM Enterprise which is a GCP Product. Better governance and visibility would be welcome for organizations of all sizes.
Source Credit: https://medium.com/google-cloud/understanding-gemini-usage-using-reports-api-shared-gems-using-drive-api-fa55639bb054?source=rss—-e52cf94d98af—4
