<?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>post How to auto trigger OTP email on validate_multifactor_auth_code page in Community Resources</title>
    <link>https://www.servicenow.com/community/community-resources/how-to-auto-trigger-otp-email-on-validate-multifactor-auth-code/ta-p/2363955</link>
    <description>&lt;P&gt;Posting this simple solution here. Seen a lot of requests for the OTP Email to be sent out automatically when users are logging in to ServiceNow&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UI Script -&amp;nbsp;AutoEmailOTP&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;addLateLoadEvent(function(){
	setTimeout(function(){
		var windowLoc = top.window.location;
		console.log('validating window..,');
		if(windowLoc.href.includes("validate_multifactor_auth_code")){
			console.log('window validated, triggering onClick...');
			multifactorSendOneTimePassword();
		}
	}, 1000); //1 second delay
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;- Feel free to remove the console.log() lines&lt;/P&gt;&lt;P&gt;- The 1 second delay is necessary to allow window.location.href to change from "navpage.do" to "validate_multifactor_auth_code.do". This may need to increase if some users have particularly slow browsers/PCs.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Oct 2022 18:54:48 GMT</pubDate>
    <dc:creator>Brian Rivera</dc:creator>
    <dc:date>2022-10-26T18:54:48Z</dc:date>
    <item>
      <title>How to auto trigger OTP email on validate_multifactor_auth_code page</title>
      <link>https://www.servicenow.com/community/community-resources/how-to-auto-trigger-otp-email-on-validate-multifactor-auth-code/ta-p/2363955</link>
      <description>&lt;P&gt;Posting this simple solution here. Seen a lot of requests for the OTP Email to be sent out automatically when users are logging in to ServiceNow&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UI Script -&amp;nbsp;AutoEmailOTP&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;addLateLoadEvent(function(){
	setTimeout(function(){
		var windowLoc = top.window.location;
		console.log('validating window..,');
		if(windowLoc.href.includes("validate_multifactor_auth_code")){
			console.log('window validated, triggering onClick...');
			multifactorSendOneTimePassword();
		}
	}, 1000); //1 second delay
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;- Feel free to remove the console.log() lines&lt;/P&gt;&lt;P&gt;- The 1 second delay is necessary to allow window.location.href to change from "navpage.do" to "validate_multifactor_auth_code.do". This may need to increase if some users have particularly slow browsers/PCs.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 18:54:48 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-resources/how-to-auto-trigger-otp-email-on-validate-multifactor-auth-code/ta-p/2363955</guid>
      <dc:creator>Brian Rivera</dc:creator>
      <dc:date>2022-10-26T18:54:48Z</dc:date>
    </item>
  </channel>
</rss>

