<?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>topic Re: Does anyone have the sample code that used to show up in the Custom Logic of the SAML Response page? It's also partially visible here:https://docs.cyberark.com/Product-Doc/OnlineHelp/Idaptive/Latest/en/Content/Applications/AppsScriptRef/SAMLCustScript.ht in Workforce Identity Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/workforce-identity-discussions/does-anyone-have-the-sample-code-that-used-to-show-up-in-the/m-p/1362387#M802</link>
    <description>&lt;P&gt;Hi Jessica,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should be the sample you are looking for&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;This script creates a signed SAML Response (sometimes a.k.a. Assertion).&lt;/LI&gt;&lt;LI&gt;Parameters passed into this script are:&lt;/LI&gt;&lt;LI&gt;Application -&lt;/LI&gt;&lt;LI&gt;The application object from the cloud storage.&lt;/LI&gt;&lt;LI&gt;Use the Get method to get a property from the storage.&lt;/LI&gt;&lt;LI&gt;For example, var url = Application.Get('Url');&lt;/LI&gt;&lt;LI&gt;LoginUser -&lt;/LI&gt;&lt;LI&gt;The login user object.&lt;/LI&gt;&lt;LI&gt;- LoginUser.Username is set to the login username as configured&lt;/LI&gt;&lt;LI&gt;in 'Account Mapping' in 'Application Settings'.&lt;/LI&gt;&lt;LI&gt;- LoginUser.Get gets the user's attribute from the&lt;/LI&gt;&lt;LI&gt;Active Directory, for example, LoginUser.Get('mail');&lt;/LI&gt;&lt;LI&gt;- LoginUser.GroupNames is set to an array of group names that&lt;/LI&gt;&lt;LI&gt;the user is directly a member of.&lt;/LI&gt;&lt;LI&gt;- LoginUser.EffectiveGroupNames is set to an array of ALL group&lt;/LI&gt;&lt;LI&gt;names that the user is a member of.&lt;/LI&gt;&lt;LI&gt;- LoginUser.GroupDNs is set to an array of group DNs that the&lt;/LI&gt;&lt;LI&gt;user is directly a member of.&lt;/LI&gt;&lt;LI&gt;- LoginUser.EffectiveGroupDNs is set to an array of ALL group DNs&lt;/LI&gt;&lt;LI&gt;that the user is a member of.&lt;/LI&gt;&lt;LI&gt;Issuer -&lt;/LI&gt;&lt;LI&gt;String value of the Issuer field in 'Application Settings'.&lt;/LI&gt;&lt;LI&gt;This value is the same as Application.Get('Issuer');&lt;/LI&gt;&lt;LI&gt;ServiceUrl -&lt;/LI&gt;&lt;LI&gt;String value of the Assertion Consumer Service URL field in&lt;/LI&gt;&lt;LI&gt;'Application Settings'. This value is the same as Application.Get('Url');&lt;/LI&gt;&lt;LI&gt;UserIdentifier -&lt;/LI&gt;&lt;LI&gt;String value of the login username for this application as&lt;/LI&gt;&lt;LI&gt;configured in 'Account Mapping' in 'Application Settings'.&lt;/LI&gt;&lt;LI&gt;This is the same as LoginUser.Username;&lt;/LI&gt;&lt;LI&gt;*/&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Set the version of SAML Response to generate.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Possible values are 1 and 2. The default is 2. */&lt;/LI&gt;&lt;LI&gt;setVersion('2');&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Set the Issuer in the SAML Response. */&lt;/P&gt;&lt;P&gt;setIssuer(Issuer);&lt;/P&gt;&lt;P&gt;/* Set the Subject in the SAML Response. */&lt;/P&gt;&lt;P&gt;setSubjectName(LoginUser.Username);&lt;/P&gt;&lt;P&gt;/* Set the Audience (a.k.a. SP Issuer or SP Entity ID) in the SAML Response.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The value is given by Service Provider, usually in SP Metadata. */&lt;/LI&gt;&lt;LI&gt;setAudience('example-audience-value');&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Set the Recipient in the SAML Response.,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Typically, it is the same as the ACS URL. */&lt;/LI&gt;&lt;LI&gt;setRecipient(ServiceUrl);&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Set whether the assertion itself or the response&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;should be signed. Possible values are 'Response' or&lt;/LI&gt;&lt;LI&gt;'Assertion'. The default is 'Response' */&lt;/LI&gt;&lt;LI&gt;setSignatureType('Response');&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Set the ACS URL to post the SAML Response to. */&lt;/P&gt;&lt;P&gt;setHttpDestination(ServiceUrl);&lt;/P&gt;&lt;P&gt;/* Some Service Provider require to use the SAML V2.0 Assertion Namespace, which writes the&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"saml:" prefix to relevant XML elements in SAML Response. Be default, it is not used.&lt;/LI&gt;&lt;LI&gt;If you are required by Service Provider to use it, uncomment this line of script,&lt;/LI&gt;&lt;LI&gt;or set the value to 'true'. */&lt;/LI&gt;&lt;LI&gt;//useNamespaceSaml20Assertion('true');&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Set a RelayState URL or string used in IdP-initiated SSO, if required&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;by the Service Provider. */&lt;/LI&gt;&lt;LI&gt;//setRelayState('/myapps-relay-state');&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* (SAML v1.x only) Set the value for the TARGET form field&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;when posting the SAML Response. Typically it is the&lt;/LI&gt;&lt;LI&gt;same as HttpDestination above. */&lt;/LI&gt;&lt;LI&gt;//setServiceUrl(ServiceUrl);&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set the DigestMethod Algorithm in the SAML Response&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Possible values are 'sha1' , 'sha256', 'sha384' or 'sha512'.&lt;/LI&gt;&lt;LI&gt;The default value is same as certificate SignatureMethod Algorithm*/&lt;/LI&gt;&lt;LI&gt;//setDigestMethodAlgorithm('Sha256');&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'Full Name' in the SAML Response to the&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;value of the user's 'cn' attribute in the AD if needed by the application */&lt;/LI&gt;&lt;LI&gt;//setAttribute('Full Name', LoginUser.Get('cn'));&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'Email' in the SAML Response to the&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;value of the user's 'mail' attribute in the AD if needed by the application */&lt;/LI&gt;&lt;LI&gt;//setAttribute('Email', LoginUser.Get('mail')); */&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'Groups' in the SAML Response to&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;an array of AD group names that the user is directly a member of.&lt;/LI&gt;&lt;LI&gt;Warning: This could result in a very large SAML Assertion so set this&lt;/LI&gt;&lt;LI&gt;only if it's really needed. */&lt;/LI&gt;&lt;LI&gt;//setAttributeArray('Groups', LoginUser.GroupNames); */&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'Groups' in the SAML Response to&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;a filtered array of AD group names that the user is directly a member of.&lt;/LI&gt;&lt;LI&gt;Filtering by either JavaScript RegEx object or C# style Regular Expression&lt;/LI&gt;&lt;LI&gt;to filter out the desired group names.&lt;/LI&gt;&lt;LI&gt;Warning: The incorrect reg-exp may result in an error or a very large SAML Assertion&lt;/LI&gt;&lt;LI&gt;so set this only if it's really needed and make sure the reg-exp is correct.*/&lt;/LI&gt;&lt;LI&gt;//setFilteredAttributeArray('Groups', LoginUser.GroupNames, &amp;lt;reg-exp&amp;gt;); */&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'Groups' in the SAML Response to&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;a filtered array of a customized JavaScript array.&lt;/LI&gt;&lt;LI&gt;Filtering by either JavaScript RegEx object or C# style Regular Expression&lt;/LI&gt;&lt;LI&gt;to filter out the desired group names.&lt;/LI&gt;&lt;LI&gt;Warning: The incorrect reg-exp may result in an error or a very large SAML Assertion&lt;/LI&gt;&lt;LI&gt;so set this only if it's really needed and make sure the reg-exp is correct.*/&lt;/LI&gt;&lt;LI&gt;//var myArray =&amp;nbsp;["myAttribute1","myAttribute2"];&lt;/LI&gt;&lt;LI&gt;//setFilteredAttributeArray('Groups', myArray, &amp;lt;reg-exp&amp;gt;); */&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'AllGroups' in the SAML Response&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;to an array of all AD group names that the user is a member of.&lt;/LI&gt;&lt;LI&gt;Warning: This could result in a very large SAML Assertion so set this&lt;/LI&gt;&lt;LI&gt;only if it's really needed. */&lt;/LI&gt;&lt;LI&gt;//setAttributeArray('AllGroups', LoginUser.EffectiveGroupNames); */&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'GroupDNs' in the SAML Response&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;to an array of AD group DNs that the user is directly a member of.&lt;/LI&gt;&lt;LI&gt;Warning: This could result in a very large SAML Assertion so set this&lt;/LI&gt;&lt;LI&gt;only if it's really needed. */&lt;/LI&gt;&lt;LI&gt;//setAttributeArray('GroupDNs', LoginUser.GroupDNs);&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'AllGroupDNs' in the SAML Response&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;to an array of all AD group DNs that the user is a member of.&lt;/LI&gt;&lt;LI&gt;Warning: This could result in a very large SAML Assertion so set this&lt;/LI&gt;&lt;LI&gt;only if it's really needed. */&lt;/LI&gt;&lt;LI&gt;//setAttributeArray('AllGroupDNs', LoginUser.EffectiveGroupDNs);&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2020 06:39:17 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2020-12-15T06:39:17Z</dc:date>
    <item>
      <title>Does anyone have the sample code that used to show up in the Custom Logic of the SAML Response page? It's also partially visible here:https://docs.cyberark.com/Product-Doc/OnlineHelp/Idaptive/Latest/en/Content/Applications/AppsScriptRef/SAMLCustScript.ht</title>
      <link>https://live.paloaltonetworks.com/t5/workforce-identity-discussions/does-anyone-have-the-sample-code-that-used-to-show-up-in-the/m-p/1362384#M799</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Field_Content_versions_oct20__0682J00000CXDXVQA5.png"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/79026i5B1CD211D176F3C2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Field_Content_versions_oct20__0682J00000CXDXVQA5.png" alt="Field_Content_versions_oct20__0682J00000CXDXVQA5.png" /&gt;&lt;/span&gt;We need it to add an extra role and I tested this in the past.  Using the sample code was very easy (uncomment some lines) but now it just says "enter code here" &lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 18:48:26 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/workforce-identity-discussions/does-anyone-have-the-sample-code-that-used-to-show-up-in-the/m-p/1362384#M799</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2020-12-09T18:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone have the sample code that used to show up in the Custom Logic of the SAML Response page? It's also partially visible here:https://docs.cyberark.com/Product-Doc/OnlineHelp/Idaptive/Latest/en/Content/Applications/AppsScriptRef/SAMLCustScript.ht</title>
      <link>https://live.paloaltonetworks.com/t5/workforce-identity-discussions/does-anyone-have-the-sample-code-that-used-to-show-up-in-the/m-p/1362385#M800</link>
      <description>&lt;P&gt;Hi Jessica,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May I know which application you are using? We could help check if we can provide the scripts for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could also click the "Reset Script" button to reset the scripts to the default one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 11:31:45 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/workforce-identity-discussions/does-anyone-have-the-sample-code-that-used-to-show-up-in-the/m-p/1362385#M800</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2020-12-11T11:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone have the sample code that used to show up in the Custom Logic of the SAML Response page? It's also partially visible here:https://docs.cyberark.com/Product-Doc/OnlineHelp/Idaptive/Latest/en/Content/Applications/AppsScriptRef/SAMLCustScript.ht</title>
      <link>https://live.paloaltonetworks.com/t5/workforce-identity-discussions/does-anyone-have-the-sample-code-that-used-to-show-up-in-the/m-p/1362386#M801</link>
      <description>Hello Jason!

It would be for Web + SAML Provisioning.

The sample code appended roles to existing roles.  I tried the 'reset script' option but it just says 'enter code here'.  It was about a year ago when I remember testing with it.

Thanks!!

Jessica</description>
      <pubDate>Fri, 11 Dec 2020 14:31:06 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/workforce-identity-discussions/does-anyone-have-the-sample-code-that-used-to-show-up-in-the/m-p/1362386#M801</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2020-12-11T14:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone have the sample code that used to show up in the Custom Logic of the SAML Response page? It's also partially visible here:https://docs.cyberark.com/Product-Doc/OnlineHelp/Idaptive/Latest/en/Content/Applications/AppsScriptRef/SAMLCustScript.ht</title>
      <link>https://live.paloaltonetworks.com/t5/workforce-identity-discussions/does-anyone-have-the-sample-code-that-used-to-show-up-in-the/m-p/1362387#M802</link>
      <description>&lt;P&gt;Hi Jessica,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should be the sample you are looking for&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;This script creates a signed SAML Response (sometimes a.k.a. Assertion).&lt;/LI&gt;&lt;LI&gt;Parameters passed into this script are:&lt;/LI&gt;&lt;LI&gt;Application -&lt;/LI&gt;&lt;LI&gt;The application object from the cloud storage.&lt;/LI&gt;&lt;LI&gt;Use the Get method to get a property from the storage.&lt;/LI&gt;&lt;LI&gt;For example, var url = Application.Get('Url');&lt;/LI&gt;&lt;LI&gt;LoginUser -&lt;/LI&gt;&lt;LI&gt;The login user object.&lt;/LI&gt;&lt;LI&gt;- LoginUser.Username is set to the login username as configured&lt;/LI&gt;&lt;LI&gt;in 'Account Mapping' in 'Application Settings'.&lt;/LI&gt;&lt;LI&gt;- LoginUser.Get gets the user's attribute from the&lt;/LI&gt;&lt;LI&gt;Active Directory, for example, LoginUser.Get('mail');&lt;/LI&gt;&lt;LI&gt;- LoginUser.GroupNames is set to an array of group names that&lt;/LI&gt;&lt;LI&gt;the user is directly a member of.&lt;/LI&gt;&lt;LI&gt;- LoginUser.EffectiveGroupNames is set to an array of ALL group&lt;/LI&gt;&lt;LI&gt;names that the user is a member of.&lt;/LI&gt;&lt;LI&gt;- LoginUser.GroupDNs is set to an array of group DNs that the&lt;/LI&gt;&lt;LI&gt;user is directly a member of.&lt;/LI&gt;&lt;LI&gt;- LoginUser.EffectiveGroupDNs is set to an array of ALL group DNs&lt;/LI&gt;&lt;LI&gt;that the user is a member of.&lt;/LI&gt;&lt;LI&gt;Issuer -&lt;/LI&gt;&lt;LI&gt;String value of the Issuer field in 'Application Settings'.&lt;/LI&gt;&lt;LI&gt;This value is the same as Application.Get('Issuer');&lt;/LI&gt;&lt;LI&gt;ServiceUrl -&lt;/LI&gt;&lt;LI&gt;String value of the Assertion Consumer Service URL field in&lt;/LI&gt;&lt;LI&gt;'Application Settings'. This value is the same as Application.Get('Url');&lt;/LI&gt;&lt;LI&gt;UserIdentifier -&lt;/LI&gt;&lt;LI&gt;String value of the login username for this application as&lt;/LI&gt;&lt;LI&gt;configured in 'Account Mapping' in 'Application Settings'.&lt;/LI&gt;&lt;LI&gt;This is the same as LoginUser.Username;&lt;/LI&gt;&lt;LI&gt;*/&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Set the version of SAML Response to generate.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Possible values are 1 and 2. The default is 2. */&lt;/LI&gt;&lt;LI&gt;setVersion('2');&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Set the Issuer in the SAML Response. */&lt;/P&gt;&lt;P&gt;setIssuer(Issuer);&lt;/P&gt;&lt;P&gt;/* Set the Subject in the SAML Response. */&lt;/P&gt;&lt;P&gt;setSubjectName(LoginUser.Username);&lt;/P&gt;&lt;P&gt;/* Set the Audience (a.k.a. SP Issuer or SP Entity ID) in the SAML Response.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The value is given by Service Provider, usually in SP Metadata. */&lt;/LI&gt;&lt;LI&gt;setAudience('example-audience-value');&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Set the Recipient in the SAML Response.,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Typically, it is the same as the ACS URL. */&lt;/LI&gt;&lt;LI&gt;setRecipient(ServiceUrl);&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Set whether the assertion itself or the response&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;should be signed. Possible values are 'Response' or&lt;/LI&gt;&lt;LI&gt;'Assertion'. The default is 'Response' */&lt;/LI&gt;&lt;LI&gt;setSignatureType('Response');&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Set the ACS URL to post the SAML Response to. */&lt;/P&gt;&lt;P&gt;setHttpDestination(ServiceUrl);&lt;/P&gt;&lt;P&gt;/* Some Service Provider require to use the SAML V2.0 Assertion Namespace, which writes the&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"saml:" prefix to relevant XML elements in SAML Response. Be default, it is not used.&lt;/LI&gt;&lt;LI&gt;If you are required by Service Provider to use it, uncomment this line of script,&lt;/LI&gt;&lt;LI&gt;or set the value to 'true'. */&lt;/LI&gt;&lt;LI&gt;//useNamespaceSaml20Assertion('true');&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Set a RelayState URL or string used in IdP-initiated SSO, if required&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;by the Service Provider. */&lt;/LI&gt;&lt;LI&gt;//setRelayState('/myapps-relay-state');&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* (SAML v1.x only) Set the value for the TARGET form field&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;when posting the SAML Response. Typically it is the&lt;/LI&gt;&lt;LI&gt;same as HttpDestination above. */&lt;/LI&gt;&lt;LI&gt;//setServiceUrl(ServiceUrl);&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set the DigestMethod Algorithm in the SAML Response&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Possible values are 'sha1' , 'sha256', 'sha384' or 'sha512'.&lt;/LI&gt;&lt;LI&gt;The default value is same as certificate SignatureMethod Algorithm*/&lt;/LI&gt;&lt;LI&gt;//setDigestMethodAlgorithm('Sha256');&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'Full Name' in the SAML Response to the&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;value of the user's 'cn' attribute in the AD if needed by the application */&lt;/LI&gt;&lt;LI&gt;//setAttribute('Full Name', LoginUser.Get('cn'));&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'Email' in the SAML Response to the&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;value of the user's 'mail' attribute in the AD if needed by the application */&lt;/LI&gt;&lt;LI&gt;//setAttribute('Email', LoginUser.Get('mail')); */&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'Groups' in the SAML Response to&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;an array of AD group names that the user is directly a member of.&lt;/LI&gt;&lt;LI&gt;Warning: This could result in a very large SAML Assertion so set this&lt;/LI&gt;&lt;LI&gt;only if it's really needed. */&lt;/LI&gt;&lt;LI&gt;//setAttributeArray('Groups', LoginUser.GroupNames); */&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'Groups' in the SAML Response to&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;a filtered array of AD group names that the user is directly a member of.&lt;/LI&gt;&lt;LI&gt;Filtering by either JavaScript RegEx object or C# style Regular Expression&lt;/LI&gt;&lt;LI&gt;to filter out the desired group names.&lt;/LI&gt;&lt;LI&gt;Warning: The incorrect reg-exp may result in an error or a very large SAML Assertion&lt;/LI&gt;&lt;LI&gt;so set this only if it's really needed and make sure the reg-exp is correct.*/&lt;/LI&gt;&lt;LI&gt;//setFilteredAttributeArray('Groups', LoginUser.GroupNames, &amp;lt;reg-exp&amp;gt;); */&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'Groups' in the SAML Response to&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;a filtered array of a customized JavaScript array.&lt;/LI&gt;&lt;LI&gt;Filtering by either JavaScript RegEx object or C# style Regular Expression&lt;/LI&gt;&lt;LI&gt;to filter out the desired group names.&lt;/LI&gt;&lt;LI&gt;Warning: The incorrect reg-exp may result in an error or a very large SAML Assertion&lt;/LI&gt;&lt;LI&gt;so set this only if it's really needed and make sure the reg-exp is correct.*/&lt;/LI&gt;&lt;LI&gt;//var myArray =&amp;nbsp;["myAttribute1","myAttribute2"];&lt;/LI&gt;&lt;LI&gt;//setFilteredAttributeArray('Groups', myArray, &amp;lt;reg-exp&amp;gt;); */&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'AllGroups' in the SAML Response&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;to an array of all AD group names that the user is a member of.&lt;/LI&gt;&lt;LI&gt;Warning: This could result in a very large SAML Assertion so set this&lt;/LI&gt;&lt;LI&gt;only if it's really needed. */&lt;/LI&gt;&lt;LI&gt;//setAttributeArray('AllGroups', LoginUser.EffectiveGroupNames); */&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'GroupDNs' in the SAML Response&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;to an array of AD group DNs that the user is directly a member of.&lt;/LI&gt;&lt;LI&gt;Warning: This could result in a very large SAML Assertion so set this&lt;/LI&gt;&lt;LI&gt;only if it's really needed. */&lt;/LI&gt;&lt;LI&gt;//setAttributeArray('GroupDNs', LoginUser.GroupDNs);&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/* Optionally set an attribute with name 'AllGroupDNs' in the SAML Response&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;to an array of all AD group DNs that the user is a member of.&lt;/LI&gt;&lt;LI&gt;Warning: This could result in a very large SAML Assertion so set this&lt;/LI&gt;&lt;LI&gt;only if it's really needed. */&lt;/LI&gt;&lt;LI&gt;//setAttributeArray('AllGroupDNs', LoginUser.EffectiveGroupDNs);&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 06:39:17 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/workforce-identity-discussions/does-anyone-have-the-sample-code-that-used-to-show-up-in-the/m-p/1362387#M802</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2020-12-15T06:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone have the sample code that used to show up in the Custom Logic of the SAML Response page? It's also partially visible here:https://docs.cyberark.com/Product-Doc/OnlineHelp/Idaptive/Latest/en/Content/Applications/AppsScriptRef/SAMLCustScript.ht</title>
      <link>https://live.paloaltonetworks.com/t5/workforce-identity-discussions/does-anyone-have-the-sample-code-that-used-to-show-up-in-the/m-p/1362388#M803</link>
      <description>Yes, that is it!!  Thanks very much!! :-)


JESSICA HART

TECH OPS ENGINEER | TECHNICAL OPERATIONS

CORELIGHT, INC

(M) 6143480288

(E)  jessica.hart@corelight.com &lt;BENJAMIN&gt;&lt;/BENJAMIN&gt;</description>
      <pubDate>Tue, 15 Dec 2020 15:16:28 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/workforce-identity-discussions/does-anyone-have-the-sample-code-that-used-to-show-up-in-the/m-p/1362388#M803</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2020-12-15T15:16:28Z</dc:date>
    </item>
  </channel>
</rss>

