Knowledge base can read for active user

Betty9
Tera Contributor

Hi everyone, How to set knowledgement base can read for all active users?  Is this script right? Any help will be appreciated.

Betty9_0-1706878355754.png

 

2 ACCEPTED SOLUTIONS

Anil Lande
Kilo Patron

Hi,

You can simply add role 'snc_internal' to your user criteria and if you want to make it available for externals then add  'snc_external' as well.

Inactive users will not be able to login to system and no need to write script.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

Aniket Chavan
Tera Sage
Tera Sage

Hello @Betty9 ,

I think if you want to make the knowledge base available for all the users then its better if you remove the user criteria from both "Can Contribute" and "Cannot Contribute" sections. This adjustment ensures that the knowledge base is accessible to all active users. Given that only active users have access to the instance, this modification aligns with your requirement.

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks,

Aniket

 

View solution in original post

4 REPLIES 4

Anil Lande
Kilo Patron

Hi,

You can simply add role 'snc_internal' to your user criteria and if you want to make it available for externals then add  'snc_external' as well.

Inactive users will not be able to login to system and no need to write script.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Aniket Chavan
Tera Sage
Tera Sage

Hello @Betty9 ,

I think if you want to make the knowledge base available for all the users then its better if you remove the user criteria from both "Can Contribute" and "Cannot Contribute" sections. This adjustment ensures that the knowledge base is accessible to all active users. Given that only active users have access to the instance, this modification aligns with your requirement.

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks,

Aniket

 

AndersBGS
Tera Patron
Tera Patron

Hi @Betty9 ,

 

Why not just remove user criteria according to product documentation: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0550924

AndersBGS_0-1706883806491.png

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards

Anders

 

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

siva krishna M2
Tera Guru
Spoiler
 

Hello @Betty9 ,

 

If you want to create user criteria for all active users through script then use below script.

 

logic to check logged in user is active or not

 

var user = gs.getUserID();

if(gs.getUser().getRecord().getValue('active'))

{

answer = true;

}

else

{

answer = false;

}

 

    (or)

 

var activeUsers = new GlideRecord('sys_user')

activeUsers.addActiveQuery();

activeUsers.addQuery('sys_id',gs.getUserID())

activeUsers.next()

if(activeUsers.hasNext())

{

answer = true;

}

else

{

answer = false

}