The CreatorCon Call for Content is officially open! Get started here.

Can we list all the reports and dashboards which are shared with public or snc_internal role?

pvn
Tera Contributor

Hi All,

Is there an easy way to find out all the reports and dashboards in the instance which are shared with public or snc_internal role?
Thanks.

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @pvn 

 

Check here sys_report_users_groups

 

AGLearnNGrow_0-1742916974076.png

 

 

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@pvn 

you can use this script and see if it helps

var gr = new GlideRecord('sys_report');
gr.addQuery('roles', 'CONTAINS', 'snc_internal');
gr.query();
while (gr.next()) {
    gs.print('Report: ' + gr.name + ' is shared with snc_internal role');
}

var grDash = new GlideRecord('pa_dashboards');
grDash.addQuery('roles', 'CONTAINS', 'snc_internal');
grDash.query();
while (grDash.next()) {
    gs.print('Dashboard: ' + grDash.name + ' is shared with snc_internal role');
}

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

@pvn 

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

Shivalika
Mega Sage
Mega Sage

Hello @pvn 

 

Go to sys_report tabla and add roles = snc_internal or roles = public.

 

For dashboard and even for report we still have an option to share it with groups. So just filter won't give you the result. 

 

You need script. Do you want me to share a script for this ? 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY