Info about the API call that lists all of the Team Drives accessible by <EmailAddress>

88 views
Skip to first unread message

Tejram Singh

unread,
Jan 24, 2020, 9:52:18 AM1/24/20
to GAM for G Suite
Hi Ross, 
Can you please share the details around the API call you are referring to on the page below that takes in an EmailAddress ? 

"The command gam print teamdriveacls user <EmailAddress> executes quickly when <EmailAddress> is in your domain because there is an API call that lists all of the Team Drives accessible by <EmailAddress>. " 
https://github.com/taers232c/GAMADV-XTD/wiki/Domain-Administrator-Team-Drives


The Drives: list API will only show the current user's shared drives and does not allow admins to supply additional EmailAddress. 
Any assistance you can provide would be greatly appreciated. Thank you and keep up the great work with GAMADV-XTD. 

Regards, 
Tejram 

Ross Scroggs

unread,
Jan 24, 2020, 10:37:49 AM1/24/20
to google-ap...@googlegroups.com
Tejram,

If you supply user <EmailAddress>, GAM checks to see if <EmailAddress> is in your domain.
Yes - Use service account access to list Team Drives for that <EmailAddress>

No - Use domain admin access to list all Team Drives
For every Team Drive in the list, get the permissions and filter for <EmailAddress>

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" 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/1c2a00fc-184c-4312-8aef-2150bf969155%40googlegroups.com.


--

Tejram Singh

unread,
Jan 24, 2020, 11:13:41 AM1/24/20
to GAM for G Suite
Thanks you for the prompt reply Ross! I'll keep digging on this. My goal is to build an AppScript that reads EmailAddress from a Sheet and return a list of Team Drives for each user. 

I know you've made this simple using GAM so I'm try to port it over to the point and click world :) 


On Friday, January 24, 2020 at 10:37:49 AM UTC-5, Ross Scroggs wrote:
Tejram,

If you supply user <EmailAddress>, GAM checks to see if <EmailAddress> is in your domain.
Yes - Use service account access to list Team Drives for that <EmailAddress>

No - Use domain admin access to list all Team Drives
For every Team Drive in the list, get the permissions and filter for <EmailAddress>

Ross

On Fri, Jan 24, 2020 at 6:52 AM 'Tejram Singh' via GAM for G Suite <google-ap...@googlegroups.com> wrote:
Hi Ross, 
Can you please share the details around the API call you are referring to on the page below that takes in an EmailAddress ? 

"The command gam print teamdriveacls user <EmailAddress> executes quickly when <EmailAddress> is in your domain because there is an API call that lists all of the Team Drives accessible by <EmailAddress>. " 
https://github.com/taers232c/GAMADV-XTD/wiki/Domain-Administrator-Team-Drives


The Drives: list API will only show the current user's shared drives and does not allow admins to supply additional EmailAddress. 
Any assistance you can provide would be greatly appreciated. Thank you and keep up the great work with GAMADV-XTD. 

Regards, 
Tejram 

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--
Ross Scroggs

Ross Scroggs

unread,
Jan 24, 2020, 11:20:00 AM1/24/20
to google-ap...@googlegroups.com
How many total Team Drives do you have? Would it be simpler to get all the Team Drive ACLs once or twice a day,
cache the results and report that to the requestor?

Ross

On Fri, Jan 24, 2020 at 8:13 AM 'Tejram Singh' via GAM for G Suite <google-ap...@googlegroups.com> wrote:
Thanks you for the prompt reply Ross! I'll keep digging on this. My goal is to build an AppScript that reads EmailAddress from a Sheet and return a list of Team Drives for each user. 
I know you've made this simple using GAM so I'm try to port it over to the point and click world :) 

On Friday, January 24, 2020 at 10:37:49 AM UTC-5, Ross Scroggs wrote:
Tejram,

If you supply user <EmailAddress>, GAM checks to see if <EmailAddress> is in your domain.
Yes - Use service account access to list Team Drives for that <EmailAddress>

No - Use domain admin access to list all Team Drives
For every Team Drive in the list, get the permissions and filter for <EmailAddress>

Ross

On Fri, Jan 24, 2020 at 6:52 AM 'Tejram Singh' via GAM for G Suite <google-ap...@googlegroups.com> wrote:
Hi Ross, 
Can you please share the details around the API call you are referring to on the page below that takes in an EmailAddress ? 

"The command gam print teamdriveacls user <EmailAddress> executes quickly when <EmailAddress> is in your domain because there is an API call that lists all of the Team Drives accessible by <EmailAddress>. " 
https://github.com/taers232c/GAMADV-XTD/wiki/Domain-Administrator-Team-Drives


The Drives: list API will only show the current user's shared drives and does not allow admins to supply additional EmailAddress. 
Any assistance you can provide would be greatly appreciated. Thank you and keep up the great work with GAMADV-XTD. 

Regards, 
Tejram 

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.


--
Ross Scroggs

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" 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/17c899e9-cdf4-4bd3-9bd7-9e60cfee8b60%40googlegroups.com.


--

Tejram Singh

unread,
Jan 24, 2020, 12:05:56 PM1/24/20
to GAM for G Suite
Thanks, we are over 15,000 and running daily reports via AppScript. The response from the Drive API do not expand team drive Group memberships so the results are different from your command below which does expand group membership. 
gam user EmailAdderss print teamdrives todrive

I'll start looking into using below for all TD. Is there a way to control the output columns ? 
 
gam <UserTypeEntity> print teamdriveacls [todrive <ToDriveAttribute>*]
        [teamdriveadminquery|query <QueryTeamDrive>] [matchname <RegularExpression>]
        [user|group <EmailAddress> [checkgroups]] (role|roles <TeamDriveACLRoleList>)*
        [oneitemperrow] [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
        [formatjson] [quotechar <Character>]

Regards, 
Tejram 
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--
Ross Scroggs

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--
Ross Scroggs

Ross Scroggs

unread,
Jan 24, 2020, 12:28:25 PM1/24/20
to google-ap...@googlegroups.com
Tejram

You want to use Domain Administrator access:

To get specific fields, use: fields <DrivePermissionsFieldNameList>

<DrivePermissionsFieldName> ::=

        additionalroles|

allowfilediscovery|

        deleted|

        displayname|name

        domain|

        emailaddress|

        expirationdate|

        expirationtime|

        id|

        permissiondetails|

        photolink|

        role|

        teamdrivepermissiondetails|

        type|

        withlink

<DrivePermissionsFieldNameList> ::= "<DrivePermissionsFieldName>(,<DrivePermissionsFieldName>)*"


Depending on how you're going to store/access the data, these options may be useful:

formatjson quotechar "'"


Ross


To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.


--
Ross Scroggs

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.


--
Ross Scroggs

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" 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/ec4bd93a-f8f9-45e6-8f15-9b5d7dcacd25%40googlegroups.com.


--

Ross Scroggs

unread,
Jan 24, 2020, 12:47:30 PM1/24/20
to google-ap...@googlegroups.com
Tejram,

Can you contact me via Google Hangouts or a Meet invitation so we can discuss what you're trying to accomplish?

Ross

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.


--
Ross Scroggs

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.


--
Ross Scroggs

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" 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/ec4bd93a-f8f9-45e6-8f15-9b5d7dcacd25%40googlegroups.com.


--

Tejram Singh

unread,
Jan 24, 2020, 1:54:28 PM1/24/20
to GAM for G Suite
Sure - invitation sent. Thank you! 


On Friday, January 24, 2020 at 12:47:30 PM UTC-5, Ross Scroggs wrote:
Tejram,

Can you contact me via Google Hangouts or a Meet invitation so we can discuss what you're trying to accomplish?

Ross
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--
Ross Scroggs

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--
Ross Scroggs

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages