<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question restrict HRSD data access from Impersonation in HRSD forum</title>
    <link>https://www.servicenow.com/community/hrsd-forum/restrict-hrsd-data-access-from-impersonation/m-p/3167503#M40016</link>
    <description>&lt;P&gt;restrict HRSD data access from Impersonation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Restrict a user to view HRSD data even after doing impersonation.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Feb 2025 06:30:05 GMT</pubDate>
    <dc:creator>deepanbhatt</dc:creator>
    <dc:date>2025-02-04T06:30:05Z</dc:date>
    <item>
      <title>restrict HRSD data access from Impersonation</title>
      <link>https://www.servicenow.com/community/hrsd-forum/restrict-hrsd-data-access-from-impersonation/m-p/3167503#M40016</link>
      <description>&lt;P&gt;restrict HRSD data access from Impersonation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Restrict a user to view HRSD data even after doing impersonation.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 06:30:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/hrsd-forum/restrict-hrsd-data-access-from-impersonation/m-p/3167503#M40016</guid>
      <dc:creator>deepanbhatt</dc:creator>
      <dc:date>2025-02-04T06:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: restrict HRSD data access from Impersonation</title>
      <link>https://www.servicenow.com/community/hrsd-forum/restrict-hrsd-data-access-from-impersonation/m-p/3167517#M40017</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/837150"&gt;@deepanbhatt&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please follow the below steps&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Identify ACL rules related to HRSD tables (sn_hr_core_case, sn_hr_core_task, etc.).&lt;/LI&gt;&lt;LI&gt;Modify these ACL rules to add conditions that prevent impersonated users from accessing HR data.&lt;/LI&gt;&lt;LI&gt;Add the following script in script section&lt;UL&gt;&lt;LI&gt;if (gs.getSession().isImpersonating()) {&lt;BR /&gt;answer = false;&lt;BR /&gt;}&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Navigate to &lt;STRONG&gt;Human Resources &amp;gt; Administration &amp;gt; Properties&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Enable &lt;STRONG&gt;"Enable additional HR data security settings"&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Ensure &lt;STRONG&gt;HR Criteria&lt;/STRONG&gt; is properly configured to prevent unauthorized access.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;3.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create a &lt;STRONG&gt;Before Query Business Rule&lt;/STRONG&gt; on HR tables (e.g., sn_hr_core_case).&lt;UL&gt;&lt;LI&gt;Add a script like:&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;if (gs.getSession().isImpersonating()) {&lt;BR /&gt;gs.addErrorMessage("Access to HR data is restricted during impersonation.");&lt;BR /&gt;current.setAbortAction(true);&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Ensure HRSD data access is &lt;STRONG&gt;role-restricted&lt;/STRONG&gt; (sn_hr_core.basic and sn_hr_core.admin).&lt;/LI&gt;&lt;LI&gt;If needed, create a &lt;STRONG&gt;custom role&lt;/STRONG&gt; that explicitly denies access during impersonation.&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;&lt;P&gt;If this solution helps you then, mark it as accepted solution ‌‌&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; and give thumbs up &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 06:42:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/hrsd-forum/restrict-hrsd-data-access-from-impersonation/m-p/3167517#M40017</guid>
      <dc:creator>pratikjagtap</dc:creator>
      <dc:date>2025-02-04T06:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: restrict HRSD data access from Impersonation</title>
      <link>https://www.servicenow.com/community/hrsd-forum/restrict-hrsd-data-access-from-impersonation/m-p/3212576#M40697</link>
      <description>&lt;P&gt;Thanks Pratik Jagtap&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 05:44:42 GMT</pubDate>
      <guid>https://www.servicenow.com/community/hrsd-forum/restrict-hrsd-data-access-from-impersonation/m-p/3212576#M40697</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2025-03-20T05:44:42Z</dc:date>
    </item>
  </channel>
</rss>

