<?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>article Idira Identity: How can I change the Application Challenge Rules to script? in Workforce Identity Articles</title>
    <link>https://live.paloaltonetworks.com/t5/workforce-identity-articles/idira-identity-how-can-i-change-the-application-challenge-rules/ta-p/1427584</link>
    <description>&lt;H3&gt;Question&lt;/H3&gt;
I am struggling with the app policies. I want to switch to use the Policy script but I do not know how to do it. I have enabled&amp;nbsp;”Use script to specify authentication rules (configured rules are ignored)”. What is the next?&lt;BR /&gt;&lt;BR /&gt;Here is one of my examples.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ka32J000000LQYaQAO__eid=ka32J000000LQYa&amp;amp;feoid=00N2J000009R3kr&amp;amp;refid=0EM2J000002xV9r.png"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/97061i5935C3B13C37EAE5/image-size/large?v=v2&amp;amp;px=999" role="button" title="ka32J000000LQYaQAO__eid=ka32J000000LQYa&amp;amp;feoid=00N2J000009R3kr&amp;amp;refid=0EM2J000002xV9r.png" alt="ka32J000000LQYaQAO__eid=ka32J000000LQYa&amp;amp;feoid=00N2J000009R3kr&amp;amp;refid=0EM2J000002xV9r.png" /&gt;&lt;/span&gt;
&lt;H3&gt;Answer&lt;/H3&gt;
You have to understand what rules you currently have. From the example, you have set&amp;nbsp;2 policies that only allow access from the internal network. In this case, checking blocked roles is not required at all. Instead, you can define the script as below.&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;&lt;SPAN style="font-size: 11px;"&gt;&lt;SPAN style="font-family: Courier New,Courier,monospace;"&gt;if(!context.onPrem){&lt;BR /&gt;&amp;nbsp; &amp;nbsp;policy.Locked = true;&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;Note: This script is to block access from the external network. Access from the internet network is allowed.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The above script does exactly the same what rules can. There is no difference. If you have difficulties using the script, we suggest using the Application Challenge Rules rather than the script. The script is a bit advanced that requires knowledge of scripting and syntax.&lt;BR /&gt;&lt;BR /&gt;To learn more about Application Challenge Rules, please feel free to refer to the below page.&lt;BR /&gt;https://docs.cyberark.com/Product-Doc/OnlineHelp/idaptive/Latest/en/Content/Applications/AppsCSH/appref-cs-app-Policy.htm&lt;BR /&gt;To understand how to configure the app access script, please refer to the following page for more examples.&amp;nbsp;&lt;BR /&gt;https://docs.cyberark.com/Product-Doc/OnlineHelp/Idaptive/Latest/en/Content/Applications/AppsScriptRef/UseSamplePolScript.htm&lt;BR /&gt;&amp;nbsp;</description>
    <pubDate>Thu, 05 Nov 2026 20:10:12 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2026-11-05T20:10:12Z</dc:date>
    <item>
      <title>Idira Identity: How can I change the Application Challenge Rules to script?</title>
      <link>https://live.paloaltonetworks.com/t5/workforce-identity-articles/idira-identity-how-can-i-change-the-application-challenge-rules/ta-p/1427584</link>
      <description>&lt;H3&gt;Question&lt;/H3&gt;
I am struggling with the app policies. I want to switch to use the Policy script but I do not know how to do it. I have enabled&amp;nbsp;”Use script to specify authentication rules (configured rules are ignored)”. What is the next?&lt;BR /&gt;&lt;BR /&gt;Here is one of my examples.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ka32J000000LQYaQAO__eid=ka32J000000LQYa&amp;amp;feoid=00N2J000009R3kr&amp;amp;refid=0EM2J000002xV9r.png"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/97061i5935C3B13C37EAE5/image-size/large?v=v2&amp;amp;px=999" role="button" title="ka32J000000LQYaQAO__eid=ka32J000000LQYa&amp;amp;feoid=00N2J000009R3kr&amp;amp;refid=0EM2J000002xV9r.png" alt="ka32J000000LQYaQAO__eid=ka32J000000LQYa&amp;amp;feoid=00N2J000009R3kr&amp;amp;refid=0EM2J000002xV9r.png" /&gt;&lt;/span&gt;
&lt;H3&gt;Answer&lt;/H3&gt;
You have to understand what rules you currently have. From the example, you have set&amp;nbsp;2 policies that only allow access from the internal network. In this case, checking blocked roles is not required at all. Instead, you can define the script as below.&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;&lt;SPAN style="font-size: 11px;"&gt;&lt;SPAN style="font-family: Courier New,Courier,monospace;"&gt;if(!context.onPrem){&lt;BR /&gt;&amp;nbsp; &amp;nbsp;policy.Locked = true;&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;Note: This script is to block access from the external network. Access from the internet network is allowed.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The above script does exactly the same what rules can. There is no difference. If you have difficulties using the script, we suggest using the Application Challenge Rules rather than the script. The script is a bit advanced that requires knowledge of scripting and syntax.&lt;BR /&gt;&lt;BR /&gt;To learn more about Application Challenge Rules, please feel free to refer to the below page.&lt;BR /&gt;https://docs.cyberark.com/Product-Doc/OnlineHelp/idaptive/Latest/en/Content/Applications/AppsCSH/appref-cs-app-Policy.htm&lt;BR /&gt;To understand how to configure the app access script, please refer to the following page for more examples.&amp;nbsp;&lt;BR /&gt;https://docs.cyberark.com/Product-Doc/OnlineHelp/Idaptive/Latest/en/Content/Applications/AppsScriptRef/UseSamplePolScript.htm&lt;BR /&gt;&amp;nbsp;</description>
      <pubDate>Thu, 05 Nov 2026 20:10:12 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/workforce-identity-articles/idira-identity-how-can-i-change-the-application-challenge-rules/ta-p/1427584</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2026-11-05T20:10:12Z</dc:date>
    </item>
  </channel>
</rss>

