taers232c / GAMADV-XTD3

Command line tool to manage Google Workspace
714 stars 87 forks source link

List Group Members Issue #244

Closed dav1303 closed 2 years ago

dav1303 commented 2 years ago

Hi

Seems we have got an issue here

gam print group-members emailmatchpattern "be_massmailing|fr_massmailing" fields group,email > D:\0-IN\Group-MassMailing\groups.csv

Getting all Groups, may take some time on a large Google Workspace Account... Got 600 Groups: a@xxx.com Traceback (most recent call last): File "init.py", line 4572, in callGAPI File "googleapiclient_helpers.py", line 131, in positional_wrapper File "googleapiclient\http.py", line 937, in execute googleapiclient.errors.HttpError: <HttpError 400 when requesting https://admin.googleapis.com/admin/directory/v1/groups?orderBy=email&fields=nextPageToken%2Cgroups%28email%29&customer=my_customer&pageToken=ClGejaCSnoeWoJqFj5qTmouev5yejY2amZCKjdGckJL_AP6YmJigz8_Pz8_Py5zNyZmZm8zInf8A_v_-_5iYmKDPz8_Pz8_LnM3JmZmbzMid__4Q4wUhImPeCKsuCHdQAloLCRqWgWEwhYFzEANggJCYjQFyBgikztiQBg%3D%3D&prettyPrint=false&alt=json returned "Invalid Input: ClGejaCSnoeWoJqFj5qTmouev5yejY2amZCKjdGckJL_AP6YmJigz8_Pz8_Py5zNyZmZm8zInf8Av-_5iYmKDPz8_Pz8_LnM3JmZmbzMid4Q4wUhImPeCKsuCHdQAloLCRqWgWEwhYFzEANggJCYjQFyBgikztiQBg==". Details: "[{'message': 'Invalid Input: ClGejaCSnoeWoJqFj5qTmouev5yejY2amZCKjdGckJL_AP6YmJigz8_Pz8_Py5zNyZmZm8zInf8Av-_5iYmKDPz8_Pz8_LnM3JmZmbzMid4Q4wUhImPeCKsuCHdQAloLCRqWgWEwhYFzEANggJCYjQFyBgikztiQBg==', 'domain': 'global', 'reason': 'invalid'}]">

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "init.py", line 26950, in getGroupMembersEntityList File "init.py", line 4692, in callGAPIpages File "init.py", line 4595, in callGAPI gamlib.glgapi.invalidInput: Invalid Input: ClGejaCSnoeWoJqFj5qTmouev5yejY2amZCKjdGckJL_AP6YmJigz8_Pz8_Py5zNyZmZm8zInf8Av-_5iYmKDPz8_Pz8_LnM3JmZmbzMid__4Q4wUhImPeCKsuCHdQAloLCRqWgWEwhYFzEANggJCYjQFyBgikztiQBg==

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "init.py", line 60199, in ProcessGAMCommand File "init.py", line 27177, in doPrintGroupMembers File "init.py", line 26955, in getGroupMembersEntityList File "init.py", line 2189, in invalidMember KeyError: 'query'

EddyH7 commented 2 years ago

We are getting the same issue with "gam print groups" tested by various admin accounts / projects / OS's / machines.

It's been happening for a couple of days now.

Getting all Groups, may take some time on a large Google Workspace Account... Got 4400 Groups: 123@**.ac.uk - abc@.ac.uk Traceback (most recent call last): File "init.py", line 4572, in callGAPI File "googleapiclient/_helpers.py", line 131, in positional_wrapper File "googleapiclient/http.py", line 937, in execute googleapiclient.errors.HttpError: <HttpError 400 when requesting https://admin.googleapis.com/admin/directory/v1/groups?orderBy=email&fields=nextPageToken%2Cgroups%28email%29&customer=my_customer&pageToken=ClaTlomaj42QlZqci8_H0piNkIqPv4yXmpmZlpqTm9GenNGKlP8A_piYmKDPz8_Pz8_JzJrPyMnHzJ7I_wD-__7_mJiYoM_Pz8_Pz8nMms_IycfMnsj__hD5IiFEOlPVwUJd0FACWgsJESEk2CiUi_IQA2C33-6tBnIGCIT32ZAG&prettyPrint=false&alt=json returned "Invalid Input: ClaTlomaj42QlZqci8_H0piNkIqPv4yXmpmZlpqTm9GenNGKlP8A_piYmKDPz8_Pz8_JzJrPyMnHzJ7I_wD-7_mJiYoM_Pz8_Pz8nMms_IycfMnsjhD5IiFEOlPVwUJd0FACWgsJESEk2CiUi_IQA2C33-6tBnIGCIT32ZAG". Details: "[{'message': 'Invalid Input: ClaTlomaj42QlZqci8_H0piNkIqPv4yXmpmZlpqTm9GenNGKlP8A_piYmKDPz8_Pz8_JzJrPyMnHzJ7I_wD-7_mJiYoM_Pz8_Pz8nMms_IycfMnsjhD5IiFEOlPVwUJd0FACWgsJESEk2CiUi_IQA2C33-6tBnIGCIT32ZAG', 'domain': 'global', 'reason': 'invalid'}]">

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "init.py", line 26719, in doPrintGroups File "init.py", line 4692, in callGAPIpages File "init.py", line 4595, in callGAPI gamlib.glgapi.invalidInput: Invalid Input: ClaTlomaj42QlZqci8_H0piNkIqPv4yXmpmZlpqTm9GenNGKlP8A_piYmKDPz8_Pz8_JzJrPyMnHzJ7I_wD-7_mJiYoM_Pz8_Pz8nMms_IycfMnsjhD5IiFEOlPVwUJd0FACWgsJESEk2CiUi_IQA2C33-6tBnIGCIT32ZAG

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "init.py", line 60199, in ProcessGAMCommand File "init.py", line 26724, in doPrintGroups File "init.py", line 2189, in invalidMember KeyError: 'query'

taers232c commented 2 years ago

This is a Google problem. When you print groups, the API returns groups in chunks; each chunk has a token that you pass to the API to get the next chunk. When there are no more groups, you get a null token and know that you're done. Google is returning an invalid token.

Ross

On Wed, Feb 23, 2022 at 10:32 AM EddyH7 @.***> wrote:

We are getting the same issue with "gam print groups" tested by various admin accounts / projects / OS's / machines.

It's been happening for a couple of days now.

Getting all Groups, may take some time on a large Google Workspace Account... Got 4400 Groups: 123@**.ac.uk http://ac.uk - abc@.ac.uk Traceback (most recent call last): File "init.py", line 4572, in callGAPI File "googleapiclient/_helpers.py", line 131, in positional_wrapper File "googleapiclient/http.py", line 937, in execute googleapiclient.errors.HttpError: <HttpError 400 when requesting https://admin.googleapis.com/admin/directory/v1/groups?orderBy=email&fields=nextPageToken%2Cgroups%28email%29&customer=my_customer&pageToken=ClaTlomaj42QlZqci8_H0piNkIqPv4yXmpmZlpqTm9GenNGKlP8A_piYmKDPz8_Pz8_JzJrPyMnHzJ7I_wD-__7_mJiYoM_Pz8_Pz8nMms_IycfMnsj__hD5IiFEOlPVwUJd0FACWgsJESEk2CiUi_IQA2C33-6tBnIGCIT32ZAG&prettyPrint=false&alt=json returned "Invalid Input: ClaTlomaj42QlZqci8_H0piNkIqPv4yXmpmZlpqTm9GenNGKlP8A_piYmKDPz8_Pz8_JzJrPyMnHzJ7I_wD-7_mJiYoM_Pz8_Pz8nMms_IycfMnsjhD5IiFEOlPVwUJd0FACWgsJESEk2CiUi_IQA2C33-6tBnIGCIT32ZAG". Details: "[{'message': 'Invalid Input: ClaTlomaj42QlZqci8_H0piNkIqPv4yXmpmZlpqTm9GenNGKlP8A_piYmKDPz8_Pz8_JzJrPyMnHzJ7I_wD-7_mJiYoM_Pz8_Pz8nMms_IycfMnsjhD5IiFEOlPVwUJd0FACWgsJESEk2CiUi_IQA2C33-6tBnIGCIT32ZAG', 'domain': 'global', 'reason': 'invalid'}]">

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "init.py", line 26719, in doPrintGroups File "init.py", line 4692, in callGAPIpages File "init.py", line 4595, in callGAPI gamlib.glgapi.invalidInput: Invalid Input: ClaTlomaj42QlZqci8_H0piNkIqPv4yXmpmZlpqTm9GenNGKlP8A_piYmKDPz8_Pz8_JzJrPyMnHzJ7I_wD-7_mJiYoM_Pz8_Pz8nMms_IycfMnsjhD5IiFEOlPVwUJd0FACWgsJESEk2CiUi_IQA2C33-6tBnIGCIT32ZAG

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "init.py", line 60199, in ProcessGAMCommand File "init.py", line 26724, in doPrintGroups File "init.py", line 2189, in invalidMember KeyError: 'query'

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/244#issuecomment-1049086747, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYL4COJCYQZFKW7ZHM2DU4UR33ANCNFSM5PEKPYXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Ross Scroggs @.***

EddyH7 commented 2 years ago

Hi Ross, thanks for getting back to us about this so quickly.

This issue seems to have gone away for us this morning so hopefully it's now resolved for everyone.

Many thanks

dav1303 commented 2 years ago

Hi

Here too perhaps Google backend

Regards

Le jeu. 24 févr. 2022, 10:31, EddyH7 @.***> a écrit :

Hi Ross, thanks for getting back to us about this so quickly.

This issue seems to have gone away for us this morning so hopefully it's now resolved for everyone.

Many thanks

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/244#issuecomment-1049658602, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADICGB655UVMT6O4MUXIXW3U4X3IXANCNFSM5PEKPYXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>