Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
[Knowledge V3] Human Resources Knowledge does not honor user criteria - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • [Knowledge V3] Human Resources Knowledge does not honor user criteria
KB0551545

[Knowledge V3] Human Resources Knowledge does not honor user criteria


1434 Views Last updated : Oct 16, 2023 public Copy Permalink
KB Summary by Now Assist

Description

The new knowledge base that is created by the Human Resources Service Management plugin is not honoring the user criteria, while other V3 knowledge bases do.

Steps to Reproduce

 

  1. Ensure that the Knowledge Management V3 plugin is activated (including demo data).
  2. Activate the Human Resources Service Management plugin (including demo data).
  3. Import the attached xml (this is user criteria that gives permission only to a specific user).
  4. Go to Knowledge > Administration > Knowledge Bases.
  5. For both IT and Human Resources Knowledge knowledge bases, go to the KB homepage.
  6. Edit the Can Read and Can Contribute related lists, by adding the User BL user criteria.
  7. Impersonate the user.
  8. Go to kb_knowledge.list.
  9. Group by Knowledge Base column (add it to the list if needed).
    You can see articles from both knowledge bases (IT and Human Resources Knowledge) as expected.
  10. Impersonate a different user (User B).
  11. Go to kb_knowledge.list.
  12. Group by Knowledge Base column (add it to the list if needed).
    You cannot see articles from the IT knowledge base (as expected), but you can still see articles from the Human Resources Knowledge knowledge base (unexpected).

Because the user criteria includes only the user BL and it is attached to both knowledge bases, the User B should not be able to have access to any of them, but still has access though the Human Resources Knowledge knowledge base.

Workaround

As a workaround, you can use a different knowledge base that is created manually.

If you need to move articles form one knowledge base to another, run the following script in Scripts - Backgrounds:

var TARGET_KB_SYS_ID = '7f4ff8eddf403100b5157a0d3df2631e'; //The sys_id of the knowledge base where we want to move the KB articles to
var TARGET_KB_CATEGORY = 'ed1c2552ff0131009b20ffffffffff65'; //The sys_id of the category inside the new knowledge base, where the KB article should be moved to

//An array of articles that we want to move to the above category in the HR knowledge base
var KB_ARTICLES_TO_MOVE = [
"KBXXXXXXXXX","KBYYYYYYYYY","KBZZZZZZZZZ"];

for (var i = 0; i < KB_ARTICLES_TO_MOVE.length; i++) {
moveKBArticle(KB_ARTICLES_TO_MOVE[i]);
}
function moveKBArticle(kbNumber) {

var kb = new GlideRecord('kb_knowledge');
kb.setWorkflow(false);
kb.addQuery('number',kbNumber);
kb.query();
if (kb.next()) {
kb.kb_knowledge_base = TARGET_KB_SYS_ID;
kb.kb_category = TARGET_KB_CATEGORY;
kb.update();
gs.print('Updated ' + kbNumber);
} else {
gs.print('Did not find ' + kbNumber);
}
}

Note that the script is designed to move articles from the base system Human Resources Knowledge knowledge base to a specific category. You will have to run this script for each category.


Related Problem: PRB646998

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

Attachments

Attachments

  • user_criteria_01ccf8ef371e0200b8c89601b3990ef5.xml

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.