Sarup Paul
ServiceNow Employee

========Update Oct 15 2019 =========

This feature is now supported OOB through Article Templates (Available via Knowledge Advanced plugin).

Article Templates

Restricted fields

========Update Oct 15 2019 =========

 

We received a few questions on how to limit the visibility of specific content, to specific audiences for knowledge articles, without having to create a new article. For example, if you have an article, in which different teams in your support organization (e.g. Tier 0, Tier 1, and Tier 2), should see different content- it is possible to separate that out in a single article. The obvious benefit is that you would not need to maintain multiple articles on the same subject matter for different audiences, which increases the chances of inconsistent information.

 

For example, see the hierarchical access structure below. The Tiers 0-2 represent your users with different roles (access control). Let's say you are creating an article on "Issues with wifi in the break room area." You can write a single article, with fields/sections of the content that are

  • Visible to all i.e. Tier 0. This could have "Instructions on how to stop/start your wifi on your device"
  • Only visible if you are Tier 1 or higher. This could have Tier 1 agent instructions on "Instructions on how to remotely reset the wifi access point"
  • Only visible if you are Tier 2 or higher. This could have Tier 2 agent instructions "How to call the network service provider to service the wifi access point"

 

article level visibility.png

This is achievable with the use of Field Level Access Control Lists (ACLs), on a field in the Knowledge table, that you want to secure by role.

 

How ACLs work

acl flow.jpg

 

After the Field-Level ACLs have been setup, you'll need to customize kb_view to include the new field.   Since the Field-Level ACLs have been applied, only users who have Tier 1 or Tier 2 access, will be able to see this information on the kb_view UI page.

 

How to add field level security to Knowledge Articles

The example below shows a two-level field level access control, where ITIL role has access to a field that a non-ITIL role does not:

 

  1. On Knowledge form, configure an additional field. In this case, we are creating a custom string field e.g. "Additional Comments"

    custom string field km.jpg

  2. Add a field level ACL that gives READ access to only users having "ITIL" role.

read acl.png

 

  • Add the field on kb_view UI Page (article view).
  • If you are using the out-of-box page, this can be done via UI Macro > kb_view_common_content
  • Add a code snippet in the xml, as show below

kb xml.png

 

Testing a new field on a Knowledge Article

So now that we have both the Field configured and the Article view UI macro updated, it's time to test. We want to see that content meant for ITIL user is only available to them, and not to non-ITIL user.

    1. Impersonate any ITIL user and confirm that the added field is available.

       

      additional comments km.jpgfield added to the KB.jpgThe ITIL user should be able to see the "Additional Comments" field on the knowledge table in the platform as well as in the knowledge article view page.

       

    2. Next, impersonate any Non-ITIL user. The Non-ITIL user should be able to see the "Additional Comments" field on the knowledge table in the platform as well as in the knowledge article view page.

      non itil field.jpg

      non itil kb 2.jpg

 

Using Field level ACLs, you can easily setup the same article to provide different sets of information, based upon the user's roles. This can greatly reduce the need to have duplicate content, increasing the need for extra maintenance and overhead. Hope you found this useful. We are planning to add easier configurability for implementing Article Section/Attribute level security in the upcoming releases.

 

Thank you to Authors/Contributors: britt.champeau abhishek.rakshe

33 Comments
Uncle Rob
Kilo Patron

I've seen some really big and scary levels of customization built to facilitate this.   This is an excellent and elegant solution.


Endorsed.


Goran WitchDoc
ServiceNow Employee

Nice one Sarup! 😃


Fernando Dunn
Mega Expert

I hoped to implement this strategy when we went live, but my organization decided that we wouldn't customize the kb_view UI page due to it taking it off of the "upgrade path". If you create a separate UI page leaving the OOB one intact, where would you need to change which page is used when viewing articles?


conradw
Kilo Contributor

Great article Sarup, the problem that I am having is how do we apply formatting to the text that we add? I have tried html tags <b> to make it bold, but doesn't work, interesting note though is that the italics tag does work <i>. I have also tried #CSS but nothing seems to apply.



Anybody got any ideas?



Thanks


Conrad


conradw
Kilo Contributor

Ignore this, it was making it bold, just such a slight difference in that font so couldnt make it out


gunjan1
Kilo Contributor

Thanks for this article it's very helpful.



I have tried this it's working fine on instance but on service portal we can't see the newly added field content for itil user. Could you please suggest how can this be done.


Sarup Paul
ServiceNow Employee

If you are using the OOB SP, then I think you would need to update the kb_article page to insert the logic.


marcus_redfern
Kilo Expert

Sarup - is this approach still valid given what has been released in later upgrades?

Goran WitchDoc
ServiceNow Employee

Hi Marcus,

I would look at knowledge blocks if your requirements are to show different parts of an article to different audiences. With these, you can create an article where some information is only visible for managers, users in a specific region and so on.

Link: https://docs.servicenow.com/bundle/newyork-servicenow-platform/page/product/knowledge-management/con...

//Göran
Feel free to connect:
LinkedIn
Subscribe to my YouTube Channel
or look at my Book: The Witch Doctor’s Guide To ServiceNow

Sarup Paul
ServiceNow Employee

Thanks for the call out Marcus. You are right, there is now OOB support for this feature via Article Templates. I have updated the blog accordingly