Show Delegators

ShowDelegators.py

Purpose

Show the email accounts delegated to a user.

URL

https://github.com/taers232c/GAM-Scripts3/blob/master/ShowDelegators.py

Edit

Identify the commands you will need to run.

"""

# Purpose: Make a CSV file showing delegators for delegates

# Note: This script can use Basic or Advanced GAM:

# https://github.com/jay0lee/GAM

# https://github.com/taers232c/GAMADV-XTD3

# Usage:

# 1: Get delegates

#  $ Basic: gam all users print delegates > ./AllDelegates.csv

#  $ Advanced: gam all users print delegates shownames > ./AllDelegates.csv

# 2: From that list of delegates, output a CSV file with headers "Delegate,Delegate Email,Delegators

#  $ python3 ShowDelegators.py ./AllDelegates.csv ./AllDelegators.csv

"""

Options

There are no options for this script.

GAM Command

This command will output the delegated email accounts in a single CSV

gam all users print delegates shownames > ./AllDelegates.csv

By OU

gam ou_and_children </Path/To/Top/OU> print delegates shownames > ./AllDelegates.csv

Python Command

Upload the python script (ShowDelegators.py) and then run this command after the GAM command above.

python3 ShowDelegators.py ./AllDelegates.csv ./AllDelegators.csv

Download CSV

Analysing in Google Sheets. You can utilize the SPLIT() function to separate the cell of multiple email addresses into separate cells.