<?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 - Dynamic Roles by OU in Workforce Identity Articles</title>
    <link>https://live.paloaltonetworks.com/t5/workforce-identity-articles/idira-identity-dynamic-roles-by-ou/ta-p/1427858</link>
    <description>This article will walk through the steps for creating a Roles based in an Active Directory OU. Roles can be used for assigning application access, MFA policies, and Idira policy settings.

&lt;H3&gt;Steps&lt;/H3&gt;
1. In the Idira Admin Portal, go to &lt;STRONG&gt;CoreServices &amp;gt; Roles&lt;/STRONG&gt; and click the &lt;STRONG&gt;Add Role&lt;/STRONG&gt; button.&lt;BR /&gt;2. Enter a name for the Role, such as the Active Directory OU that the Role will map to.&lt;BR /&gt;3. Click on the pulldown list under &lt;STRONG&gt;Role Type&lt;/STRONG&gt; and select &lt;STRONG&gt;Dynamic&lt;/STRONG&gt;. Click &lt;STRONG&gt;Save&lt;/STRONG&gt;.&lt;BR /&gt;4. Edit the Role and go to &lt;STRONG&gt;Members&lt;/STRONG&gt;.&lt;BR /&gt;5. Enter the following script into the Custom Logic field and customize the &lt;SPAN style="color: #c0392b;"&gt;red text&lt;/SPAN&gt; with the name of the desired Active Directory OU that you want to map the Role to. Click &lt;STRONG&gt;Save&lt;/STRONG&gt;.
&lt;PRE class="ckeditor_codeblock"&gt;
DN = User.Properties.Properties['distinguishedName'];
trace('User: '+ DN);
result = DN.search(/OU=&lt;SPAN style="color: #c0392b;"&gt;Windows Admins&lt;/SPAN&gt;/i);
trace ('Results are in: '+ result);
if (result &amp;gt; 0) { return true;}
else {
&amp;nbsp; &amp;nbsp; return false;&amp;nbsp;
}&lt;/PRE&gt;
&lt;BR /&gt;Click the &lt;STRONG&gt;Test User&lt;/STRONG&gt; button and select a user to verify if the script is performing as intended.&lt;BR /&gt;&amp;nbsp;</description>
    <pubDate>Thu, 05 Nov 2026 20:08:11 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2026-11-05T20:08:11Z</dc:date>
    <item>
      <title>Idira Identity - Dynamic Roles by OU</title>
      <link>https://live.paloaltonetworks.com/t5/workforce-identity-articles/idira-identity-dynamic-roles-by-ou/ta-p/1427858</link>
      <description>This article will walk through the steps for creating a Roles based in an Active Directory OU. Roles can be used for assigning application access, MFA policies, and Idira policy settings.

&lt;H3&gt;Steps&lt;/H3&gt;
1. In the Idira Admin Portal, go to &lt;STRONG&gt;CoreServices &amp;gt; Roles&lt;/STRONG&gt; and click the &lt;STRONG&gt;Add Role&lt;/STRONG&gt; button.&lt;BR /&gt;2. Enter a name for the Role, such as the Active Directory OU that the Role will map to.&lt;BR /&gt;3. Click on the pulldown list under &lt;STRONG&gt;Role Type&lt;/STRONG&gt; and select &lt;STRONG&gt;Dynamic&lt;/STRONG&gt;. Click &lt;STRONG&gt;Save&lt;/STRONG&gt;.&lt;BR /&gt;4. Edit the Role and go to &lt;STRONG&gt;Members&lt;/STRONG&gt;.&lt;BR /&gt;5. Enter the following script into the Custom Logic field and customize the &lt;SPAN style="color: #c0392b;"&gt;red text&lt;/SPAN&gt; with the name of the desired Active Directory OU that you want to map the Role to. Click &lt;STRONG&gt;Save&lt;/STRONG&gt;.
&lt;PRE class="ckeditor_codeblock"&gt;
DN = User.Properties.Properties['distinguishedName'];
trace('User: '+ DN);
result = DN.search(/OU=&lt;SPAN style="color: #c0392b;"&gt;Windows Admins&lt;/SPAN&gt;/i);
trace ('Results are in: '+ result);
if (result &amp;gt; 0) { return true;}
else {
&amp;nbsp; &amp;nbsp; return false;&amp;nbsp;
}&lt;/PRE&gt;
&lt;BR /&gt;Click the &lt;STRONG&gt;Test User&lt;/STRONG&gt; button and select a user to verify if the script is performing as intended.&lt;BR /&gt;&amp;nbsp;</description>
      <pubDate>Thu, 05 Nov 2026 20:08:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/workforce-identity-articles/idira-identity-dynamic-roles-by-ou/ta-p/1427858</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2026-11-05T20:08:11Z</dc:date>
    </item>
  </channel>
</rss>

