Sharing Multiple Reports with Multiple Groups without Typing in Each Group Individually.

ellencarpen
Tera Contributor

I have a requirement of sharing 30 plus reports with 5 Users and 15 Assignment Groups. It is exhausting typing all 20 into every Share section of every report. I can't copy and paste. Is there any way that a non-administrator can select multiple reports and share it to the Users/Groups simultaneously OR a workaround the cut and paste? 

 

 

1 ACCEPTED SOLUTION

@ellencarpen 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

6 REPLIES 6

folusho
Tera Guru

@ellencarpen 

 

Please insert into this table: sys_report_users_groups

 

Or you can use this script:

(function() {
    // Arrays of the report sys_ids
    var reportIds = [
        'report_sys_id_1',
        'report_sys_id_2',
        'report_sys_id_3'
    ];

    var groupIds = [
        'group_sys_id_1',
        'group_sys_id_2'
    ];

    var userIds = [
        'user_sys_id_1',
        'user_sys_id_2'
    ];

    // Insert combinations
    for (var i = 0; i < reportIds.length; i++) {
        for (var j = 0; j < groupIds.length; j++) {
            for (var k = 0; k < userIds.length; k++) {
                var gr = new GlideRecord('sys_report_users_groups');
                gr.initialize();
                gr.report_id = reportIds[i];
                gr.group_id = groupIds[j];
                gr.user_id = userIds[k];
                gr.insert();

                gs.info('Inserted entry for report: ' + reportIds[i] +
                        ', group: ' + groupIds[j] +
                        ', user: ' + userIds[k]);
            }
        }
    }
})();

 

folusho_0-1746743613367.png

 

 

Robert H
Mega Sage

Hello @ellencarpen ,

 

There is no way for a non-administrator to achieve this, but here are some ideas that might make things a bit easier for you:

 

  • If these 15 assignment groups happen to all have the same Parent group then you can share the report with just that parent group and all its child groups can access it.
  • Unless the contents of these reports are confidential you could just share all the reports with "Everyone", and then put them on a Dashboard. Then share that Dashboard with the 5 users and 15 groups.

Regards,

Robert

ellencarpen
Tera Contributor

Thank you. Unfortunately, they do not share the same Parent group, and I am prohibited from sharing with everyone. It is so tedious and time consuming, if only I had the admin role... 🙂 

Hello @ellencarpen ,

 

Maybe you can check with your ServiceNow admin team if they can grant you the "report_global" role. That would allow you to share the reports with "Everyone".

 

Regards,

Robert