<?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 Setup ServiceNow Password Policy to not contain username when user configures new password in ServiceNow AI Platform forum</title>
    <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/setup-servicenow-password-policy-to-not-contain-username-when/m-p/2386710#M186562</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am new in exploring ServiceNow's password reset application. Although my organization's passwords are synchronized via a 3rd party integration, there are some cases where passwords in ServiceNow for admin and service accounts are configured independently. That being said, I have a requirement where in a password should meet the following criteria:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- At least 1 uppercase letter (Done)&lt;/P&gt;&lt;P&gt;- At least 1 lowercase letter&amp;nbsp;(Done)&lt;/P&gt;&lt;P&gt;- At least 1 number&amp;nbsp;(Done)&lt;/P&gt;&lt;P&gt;- At lease 1 special character&amp;nbsp;(Done)&lt;/P&gt;&lt;P&gt;- Password cannot contain your User ID (user_name) or any part of your full name - &lt;STRONG&gt;This one I need help with&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So here's what I've done so far. In the Password Reset Credential Store, this is the setup in the Local ServiceNow instance:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paatmarquez_1-1668703223151.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/218208i080B9A30C29621DB/image-size/large?v=v2&amp;amp;px=999" role="button" title="paatmarquez_1-1668703223151.png" alt="paatmarquez_1-1668703223151.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Auto generate password is &lt;STRONG&gt;PasswordPolicyCompliantAutoGenPassword&amp;nbsp;&lt;/STRONG&gt;and I created a custom password policy named "&lt;STRONG&gt;High&lt;/STRONG&gt;". I've setup the first 4 requirements in the password policy I created. However, the last requirement (&lt;EM&gt;Password cannot contain your User ID (user_name) or any part of your full name&lt;/EM&gt;) is not working. Could someone help me with this please?&lt;BR /&gt;&lt;BR /&gt;Here's the password policy configuration I made:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paatmarquez_3-1668703699509.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/218210iAA283817F9D6C11B/image-size/large?v=v2&amp;amp;px=999" role="button" title="paatmarquez_3-1668703699509.png" alt="paatmarquez_3-1668703699509.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here's the complete Password Policy script:&lt;/P&gt;&lt;P&gt;(function executeScript() {&lt;BR /&gt;var options = {};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;return isValid(options) ? options : {};&lt;/P&gt;&lt;P&gt;// DO NOT MODIFY THIS VALIDATION METHOD&lt;BR /&gt;function isValid(options) {&lt;BR /&gt;if (options &amp;amp;&amp;amp; Object.keys(options).length &amp;gt; 0) {&lt;BR /&gt;for (x in options) {&lt;BR /&gt;if (isNaN(options[x])) {&lt;BR /&gt;gs.error('PasswordPolicy: ' + x + ' is not a number = ' + options[x]);&lt;BR /&gt;return false;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;if(cantUserName()) {&lt;BR /&gt;return false;&lt;BR /&gt;}&lt;BR /&gt;return true;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;function cantUserName(){&lt;BR /&gt;var uid = gs.getUserName();&lt;BR /&gt;var uname = gs.getUserDisplayName();&lt;BR /&gt;if((user_password.indexOf(uid)!=-1) || (user_password.indexOf(uname)!=-1))&lt;BR /&gt;{&lt;BR /&gt;gs.error('Password cannot contain your name or username');&lt;BR /&gt;return false;&lt;BR /&gt;}&lt;BR /&gt;return true;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;})();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Could someone help me with this, please? I am also not sure if this is the correct place where I should make changes. Any detailed help is appreciated. Thanks in advance!&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Nov 2022 16:53:15 GMT</pubDate>
    <dc:creator>paatmarquez</dc:creator>
    <dc:date>2022-11-17T16:53:15Z</dc:date>
    <item>
      <title>Setup ServiceNow Password Policy to not contain username when user configures new password</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/setup-servicenow-password-policy-to-not-contain-username-when/m-p/2386710#M186562</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am new in exploring ServiceNow's password reset application. Although my organization's passwords are synchronized via a 3rd party integration, there are some cases where passwords in ServiceNow for admin and service accounts are configured independently. That being said, I have a requirement where in a password should meet the following criteria:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- At least 1 uppercase letter (Done)&lt;/P&gt;&lt;P&gt;- At least 1 lowercase letter&amp;nbsp;(Done)&lt;/P&gt;&lt;P&gt;- At least 1 number&amp;nbsp;(Done)&lt;/P&gt;&lt;P&gt;- At lease 1 special character&amp;nbsp;(Done)&lt;/P&gt;&lt;P&gt;- Password cannot contain your User ID (user_name) or any part of your full name - &lt;STRONG&gt;This one I need help with&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So here's what I've done so far. In the Password Reset Credential Store, this is the setup in the Local ServiceNow instance:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paatmarquez_1-1668703223151.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/218208i080B9A30C29621DB/image-size/large?v=v2&amp;amp;px=999" role="button" title="paatmarquez_1-1668703223151.png" alt="paatmarquez_1-1668703223151.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Auto generate password is &lt;STRONG&gt;PasswordPolicyCompliantAutoGenPassword&amp;nbsp;&lt;/STRONG&gt;and I created a custom password policy named "&lt;STRONG&gt;High&lt;/STRONG&gt;". I've setup the first 4 requirements in the password policy I created. However, the last requirement (&lt;EM&gt;Password cannot contain your User ID (user_name) or any part of your full name&lt;/EM&gt;) is not working. Could someone help me with this please?&lt;BR /&gt;&lt;BR /&gt;Here's the password policy configuration I made:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paatmarquez_3-1668703699509.png" style="width: 999px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/218210iAA283817F9D6C11B/image-size/large?v=v2&amp;amp;px=999" role="button" title="paatmarquez_3-1668703699509.png" alt="paatmarquez_3-1668703699509.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here's the complete Password Policy script:&lt;/P&gt;&lt;P&gt;(function executeScript() {&lt;BR /&gt;var options = {};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;return isValid(options) ? options : {};&lt;/P&gt;&lt;P&gt;// DO NOT MODIFY THIS VALIDATION METHOD&lt;BR /&gt;function isValid(options) {&lt;BR /&gt;if (options &amp;amp;&amp;amp; Object.keys(options).length &amp;gt; 0) {&lt;BR /&gt;for (x in options) {&lt;BR /&gt;if (isNaN(options[x])) {&lt;BR /&gt;gs.error('PasswordPolicy: ' + x + ' is not a number = ' + options[x]);&lt;BR /&gt;return false;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;if(cantUserName()) {&lt;BR /&gt;return false;&lt;BR /&gt;}&lt;BR /&gt;return true;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;function cantUserName(){&lt;BR /&gt;var uid = gs.getUserName();&lt;BR /&gt;var uname = gs.getUserDisplayName();&lt;BR /&gt;if((user_password.indexOf(uid)!=-1) || (user_password.indexOf(uname)!=-1))&lt;BR /&gt;{&lt;BR /&gt;gs.error('Password cannot contain your name or username');&lt;BR /&gt;return false;&lt;BR /&gt;}&lt;BR /&gt;return true;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;})();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Could someone help me with this, please? I am also not sure if this is the correct place where I should make changes. Any detailed help is appreciated. Thanks in advance!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 16:53:15 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/setup-servicenow-password-policy-to-not-contain-username-when/m-p/2386710#M186562</guid>
      <dc:creator>paatmarquez</dc:creator>
      <dc:date>2022-11-17T16:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Setup ServiceNow Password Policy to not contain username when user configures new password</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/setup-servicenow-password-policy-to-not-contain-username-when/m-p/2386985#M186567</link>
      <description>&lt;P&gt;Hi Paatmarquez,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The password policy record has a "disallow user data" checkbox. According to the tooltip, it checks against firstname, lastname, username and company fields - seems like what you're looking for. For "custom" it looks like it is default located under the script field:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mattystern_0-1668718919289.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/218291i6168210B530D5FE8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mattystern_0-1668718919289.png" alt="mattystern_0-1668718919289.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 21:05:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/setup-servicenow-password-policy-to-not-contain-username-when/m-p/2386985#M186567</guid>
      <dc:creator>mattystern</dc:creator>
      <dc:date>2022-11-17T21:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Setup ServiceNow Password Policy to not contain username when user configures new password</title>
      <link>https://www.servicenow.com/community/servicenow-ai-platform-forum/setup-servicenow-password-policy-to-not-contain-username-when/m-p/2387702#M186573</link>
      <description>&lt;P&gt;Thanks for your response! For some reason, I could not find this field&amp;nbsp; in our instance. We're still currently in the Rome version though. But I tried recreating this in my developer instance in the Tokyo version and I enabled the "&lt;STRONG&gt;Disallow User Date&lt;/STRONG&gt;". This worked perfectly. I guess this is a new feature.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot! Appreciate your help.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 11:52:16 GMT</pubDate>
      <guid>https://www.servicenow.com/community/servicenow-ai-platform-forum/setup-servicenow-password-policy-to-not-contain-username-when/m-p/2387702#M186573</guid>
      <dc:creator>patmaq</dc:creator>
      <dc:date>2022-11-18T11:52:16Z</dc:date>
    </item>
  </channel>
</rss>

