Unable to list users of all group emails (google apps script)
up vote
0
down vote
favorite
I am trying to write a script that will save all users of a Group address to a spreadsheet. I am running into a problem with groups that I am not a member of. (this works fine if I am a member or owner of the group)
If i go to https://groups.google.com/a/(domain)/forum/#!members/(groupname) I can view all of the members of the group. However when I try to program this out using:
var group = GroupsApp.getGroupByEmail(GROUP_EMAIL);
var users = group.getUsers();
I get: "You do not have permission to view the member list for the group:" for groups that I am not currently a member/owner of. For the sake of not having to add me to every group, is there a way to get this to work with out needing access to the AdminDirectory?
When I tried with AdminDirectory, I get:
"error":
"errors": [
"domain": "global",
"reason": "forbidden",
"message": "Not Authorized to access this resource/api"
],
"code": 403,
"message": "Not Authorized to access this resource/api"
I would think there would be since I can view all members from the http address that I listed above, even while not a member
google-apps-script google-apps-script-api
add a comment |
up vote
0
down vote
favorite
I am trying to write a script that will save all users of a Group address to a spreadsheet. I am running into a problem with groups that I am not a member of. (this works fine if I am a member or owner of the group)
If i go to https://groups.google.com/a/(domain)/forum/#!members/(groupname) I can view all of the members of the group. However when I try to program this out using:
var group = GroupsApp.getGroupByEmail(GROUP_EMAIL);
var users = group.getUsers();
I get: "You do not have permission to view the member list for the group:" for groups that I am not currently a member/owner of. For the sake of not having to add me to every group, is there a way to get this to work with out needing access to the AdminDirectory?
When I tried with AdminDirectory, I get:
"error":
"errors": [
"domain": "global",
"reason": "forbidden",
"message": "Not Authorized to access this resource/api"
],
"code": 403,
"message": "Not Authorized to access this resource/api"
I would think there would be since I can view all members from the http address that I listed above, even while not a member
google-apps-script google-apps-script-api
Which is really an intended behavior. "The GroupsApp service uses the permissions of the GROUP to determine whether or not you can view the members list" as what was described in this SO post. You can follow the suggested action from this SO answer.
– MαπμQμαπkγVπ.0
Nov 9 at 10:22
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to write a script that will save all users of a Group address to a spreadsheet. I am running into a problem with groups that I am not a member of. (this works fine if I am a member or owner of the group)
If i go to https://groups.google.com/a/(domain)/forum/#!members/(groupname) I can view all of the members of the group. However when I try to program this out using:
var group = GroupsApp.getGroupByEmail(GROUP_EMAIL);
var users = group.getUsers();
I get: "You do not have permission to view the member list for the group:" for groups that I am not currently a member/owner of. For the sake of not having to add me to every group, is there a way to get this to work with out needing access to the AdminDirectory?
When I tried with AdminDirectory, I get:
"error":
"errors": [
"domain": "global",
"reason": "forbidden",
"message": "Not Authorized to access this resource/api"
],
"code": 403,
"message": "Not Authorized to access this resource/api"
I would think there would be since I can view all members from the http address that I listed above, even while not a member
google-apps-script google-apps-script-api
I am trying to write a script that will save all users of a Group address to a spreadsheet. I am running into a problem with groups that I am not a member of. (this works fine if I am a member or owner of the group)
If i go to https://groups.google.com/a/(domain)/forum/#!members/(groupname) I can view all of the members of the group. However when I try to program this out using:
var group = GroupsApp.getGroupByEmail(GROUP_EMAIL);
var users = group.getUsers();
I get: "You do not have permission to view the member list for the group:" for groups that I am not currently a member/owner of. For the sake of not having to add me to every group, is there a way to get this to work with out needing access to the AdminDirectory?
When I tried with AdminDirectory, I get:
"error":
"errors": [
"domain": "global",
"reason": "forbidden",
"message": "Not Authorized to access this resource/api"
],
"code": 403,
"message": "Not Authorized to access this resource/api"
I would think there would be since I can view all members from the http address that I listed above, even while not a member
google-apps-script google-apps-script-api
google-apps-script google-apps-script-api
asked Nov 8 at 16:12
Kevin Schenk
1
1
Which is really an intended behavior. "The GroupsApp service uses the permissions of the GROUP to determine whether or not you can view the members list" as what was described in this SO post. You can follow the suggested action from this SO answer.
– MαπμQμαπkγVπ.0
Nov 9 at 10:22
add a comment |
Which is really an intended behavior. "The GroupsApp service uses the permissions of the GROUP to determine whether or not you can view the members list" as what was described in this SO post. You can follow the suggested action from this SO answer.
– MαπμQμαπkγVπ.0
Nov 9 at 10:22
Which is really an intended behavior. "The GroupsApp service uses the permissions of the GROUP to determine whether or not you can view the members list" as what was described in this SO post. You can follow the suggested action from this SO answer.
– MαπμQμαπkγVπ.0
Nov 9 at 10:22
Which is really an intended behavior. "The GroupsApp service uses the permissions of the GROUP to determine whether or not you can view the members list" as what was described in this SO post. You can follow the suggested action from this SO answer.
– MαπμQμαπkγVπ.0
Nov 9 at 10:22
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53211741%2funable-to-list-users-of-all-group-emails-google-apps-script%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Which is really an intended behavior. "The GroupsApp service uses the permissions of the GROUP to determine whether or not you can view the members list" as what was described in this SO post. You can follow the suggested action from this SO answer.
– MαπμQμαπkγVπ.0
Nov 9 at 10:22