web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested answer

Dynamics Portals - Users with same email address

(0) ShareShare
ReportReport
Posted on by 425

Hi,

For our portal user registration process, we are only allowing new users with invitation code and we are facing an issue, where two contacts with same email address are able to redeem the invitation and signup. We want to stop that happening. In my trial it works in the same way, but if i go in the open registration route, it complains saying "email address already taken", which is what i want even with the redeem invitation code process.

I have this site setting - Authentication/UserManager/UserValidator/RequireUniqueEmail set to true.

Any thoughts please?

Thanks

I have the same question (0)
  • mike_riley Profile Picture
    on at
    RE: Dynamics Portals - Users with same email address

    Hello,

    You may want to look into setting the invitation type to "Single" not "Group" on the Send Invitation workflow. Group invitation codes work for multiple contacts, where single invitation codes work for 1 contact. More information here: docs.microsoft.com/.../invite-contacts

    Another enhancement would be to add a duplicate detection rule to your contact entity, to prevent any contacts being created with the same email address.

    Thanks,

    Mike

  • Nicholas Hayduk Profile Picture
    2,863 on at
    RE: Dynamics Portals - Users with same email address

    Can you describe the flow a bit?

    What sends out the invitation code? What type of authentication are you using? When are you hoping for the user to get an error about the email not being unique?

    Nick

  • Jeevan Kumar Balija Profile Picture
    425 on at
    RE: Dynamics Portals - Users with same email address

    Hi Nick,

    Thanks for the reply.

    It's a local authentication.

    We have created a workflow on contact to send the invitation code, so D365 user will invite the contacts to sign up for the portal with a link sent in an email.

    When the contact clicks the link from the email to redeem the invitation which obviously takes you to portal Redeem invitation page with the code pre-populated.

    On clicking Register button will take you to the Registration page with the email pre-populated, on this page once the user fills the username and password then clicks on Register button i am expecting the validation should trigger to check if there is a contact with the same email address already exists which is not happening.

    But the same validation happens if we go via open registration or if the user want to update their email address after the signup.

    We are thinking of having duplicate detection or plug-in on the D365 side to avoid duplicates, but wanted to check if i am missing some obvious setting or is it expected behaviour on the portal?

    Thanks

  • Jeevan Kumar Balija Profile Picture
    425 on at
    RE: Dynamics Portals - Users with same email address

    Hi Mike,

    Thanks for the reply.

    Yes is is single type, yes there are options on the D365 side, but wanted to understand from portal point of view is it expected behaviour when it is not allowing the same if we go in the open registration route.

  • Suggested answer
    Nicholas Hayduk Profile Picture
    2,863 on at
    RE: Dynamics Portals - Users with same email address

    My best guess is that the code that initializes the existing contact (in the case of invitation code) doesn't perform the validation, but the code that create a new open (in the case of open registration) does not. I haven't been able to track down the exact line of code in the source code release, but I can tell that the registration process does call two different functions (CreateAsync vs InitializeUserAsync), so my guess is that's where the problem is.

    In my opinion, that's probably not intended and so I would recommend logging it as a bug with Microsoft support.

    Nick

  • Suggested answer
    mike_riley Profile Picture
    on at
    RE: Dynamics Portals - Users with same email address

    Hi Jeevan,

        The open registration page is creating a new contact record, where the invitation sign up page is updating an existing contact record. The one thing I found while testing is the 'Email' field on the invitation page is actually the 'User Name' field on the Contact record. With that said, I found a potential workaround to your issue:

    1. Add this site setting to force users to use email to login locally, be sure to set to true:

    Authentication/Registration/LocalLoginByEmail

    2. Create a Duplicate Detection rule for the User Name field on the Contact entity.

    3. Optional - Make Email field read-only through JS.

    This will throw an error message "The user name "...." is already taken" when there's an existing portal contact with the user name entered in the email field on the portal.

    Hope this helps!

    Mike

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 64

#2
CU29080825-0 Profile Picture

CU29080825-0 16

#2
mk1329 Profile Picture

mk1329 16

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans