Sai Kumar B
Mega Sage
Options
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 12-24-2021 10:36 PM
Hi All,
Today I have found an amazing undocumented API that outputs all logged-in user group sys_id(s). You can use this to reduce the amount of scripting 😉
You can try this in your Background script
gs.print(gs.getUser().getMyGroups())
Output :
Regards,
Sai Kumar
- 6,923 Views
Comments
Patrik Z
Giga Guru
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
08-29-2024
01:51 AM
Hi, yea but the the problem is the returned value is not an array.
Do you know what type of an object is returned?

Manolis Sgouro1
Tera Contributor
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
01-06-2025
12:48 AM

Paul Kunze
Tera Guru
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
04-23-2025
04:55 AM
You can easily convert the object to a comma-separated String like this:
var myGroups = JSON.parse(JSON.stringify(gs.getUser().getMyGroups())).toString();
Looks like overkill but works 🙂