CRM Portal – Validate that Email already exists when using "Forgot Password"

Hello Everyone,

I have been seen a lot of people were asking about \’Forget Password\’ strange behavior in CRM Portal.

CRM Portal provides Forget Password option like other portal or websites, that allows users to reset their password if they have either forgotten their password or triggered an intruder lockout to authenticate with an alternate factor and repair their own problem, without calling the help desk.

CRM Portal ask the user to enter an email address in order to send password reset link. But it does not check whether email exists in CRM or for duplicate contact of same email address.

You either get an error message or not receive the email due to following reasons :

  1. If multiple contacts found of same email address in CRM.
  2. If the entered email address does not exist in CRM.
  3. Is the email address written correctly in the contact and on the password reset control?
Although people have posted this in Microsoft Dynamics 365 Ideas Portal (here), but not sure whether this would be included in the future release or not. 

Solution 1 –


Enable duplicate detection rule in CRM and create a new rule to warn users to not create duplicate contact of same email address. But by doing this, you can only warn or give a message to the user but cannot restrict from contact creation of same email address.
Also, by doing this you can only check for duplicate contacts of same email address, not whether the user exists or not.

Solution 2 –


Create a new Content Snippet record


Name – Account/ForgotPassword/PageCopy
Website –
Value – text


Hide, out of box Send button and create your own custom button


$(window).load(function() {
$(\’#submit-forgot-password\’).hide();
$(\’#submit-forgot-password\’).after(\’\’);

// You can apply the CSS as well on the button by adding a Style tag to it.
});

Write OData query to check for duplicate contacts of same email address and to check whether email id exists in CRM or not.


Refer below article if you are not aware how to use the OData in Portal.

http://arpitmscrmhunt.blogspot.in/2016/12/adxstudio-portal-how-to-use-odata.html

Put it inside the window.load function.
$(\’#checkemailId\’).click(function () {
var inputEmailAddres = $(\”#Email\”).val();
var odataurl= \”~/_odata/contacts?$filter=emailaddress1%20eq%20%27\” + inputEmailAddres + \”%27%20or%20emailaddress2%20eq%20%27\” + inputEmailAddres + \”%27\”;
            $.ajax({
                type: \”GET\”,
                url: odataurl,
                dataType: \’json\’
            }).done(function (json) {
                 var contactsColl = json.value;
                 // If multiple email id found
                if (contactsColl.length > 1)
                {
                     alert(\”Multiple Contact Foundof entered email address\”);
                }
                 // If Single email id found
if (contactsColl.length == 1)
                {
                   $(\’#checkemailId\’).val(\’Sending…\’);
                    $(\’#submit-forgot-password\’).click();
                }
                // If email id not found
if (contactsColl.length == 0)
                {
                     alert(\”Entered Email Id does not exist in system\”);
                }
            })
});

Published by arpitpowerguide

My name is Arpit Shrivastava, who is a Microsoft MVP in the Business Applications category. I am a Microsoft Dynamics 365 and Power Platform enthusiast person who is having a passion for researching and learning new things and acquiring immense knowledge. I am providing consistent help, support, and sharing my knowledge through various Social Media Channels along with my Personal Blog, Microsoft Community, conducting online training and attending various 365 Saturday Events worldwide and sharing the best Solutions to the readers helping them achieve their goals and objectives in Customer Relationship Space.

7 thoughts on “CRM Portal – Validate that Email already exists when using "Forgot Password"

  1. At present writeup, we will deal in detail with the AOL mail service. AOL mail is a free web-based email service that is provided by AOL. AOL mail is one of the most popular to provide the best email services and media in this technology world.It may be possible that sometimes you get an error like the AOL mail login issue with the AOL account. Almost time the problem report is AOL email sign in.

    Like

  2. Special thanks to (hackingsetting50@gmail.com) for exposing my cheating husband. Right with me i got a lot of evidences and proofs that shows that my husband is a fuck boy and as well a cheater ranging from his text messages, call logs, whats-app messages, deleted messages and many more, All thanks to (hackingsetting50@gmail.com), if not for him i will never know what has been going on for a long time. Contact him now and thank me later.

    Like

  3. Special thanks to (hackingsetting50@gmail.com) for exposing my cheating husband. Right with me i got a lot of evidences and proofs that shows that my husband is a fuck boy and as well a cheater ranging from his text messages, call logs, whats-app messages, deleted messages and many more, All thanks to (hackingsetting50@gmail.com), if not for him i will never know what has been going on for a long time. Contact him now and thank me later.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: