Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

ADX Studio Invitation Redemption and User Creation from CRM Invitation

Posted on by Microsoft Employee

Hello, 

I am trying to set up the functionality for creating users of my ADX Studio portal. 

I see how the invitation redemption functionality works, but I would like to by-pass this solution. Instead, I would like to be able to create a user, with base user information from the contact form, such as the name, email, and web role, as well as a user name (their email) and a stock password. Then, I would like to send an email to the email address that has been created for this account with the username, password, and website link, and require the user to change their password when they first login to the portal. 

This would allow me to include only the Sign In button on my portal, where users are not going to create their own logins from that screen. They also will not be redeeming a Invitation code, as the invitation system uses. They would simply be logging in. 

I have gotten close with the Invitation Redemption, but have only found a solution that requires the user to redeem the Invitation code manually. I found a link that pointed me to using "http://<MyPortalName>/sign-up?InvitationCode={Invitation Code(Invitation)}"  when sending from an invitation link, which looks like it should be injecting the Invitation code into a redemption field, and directing the user to the contact creation screen. However, this references a "sign-up" page that we do not have. 

Can anybody help with a solution to this? Is there an OOB solution to this, or does this require further development? 

Thanks,

Ken

*This post is locked for comments

  • Abhishek Bihani Profile Picture
    Abhishek Bihani 255 on at
    RE: ADX Studio Invitation Redemption and User Creation from CRM Invitation

    Hi Ken,

    We need to assign default web roles on create of contact.

    Can we do using "Assign web Role" ADX Studio workflow ?

    Thanks !

    Regards,

    Abhishek.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: ADX Studio Invitation Redemption and User Creation from CRM Invitation

    **EDIT**: The issue that I describe below was solved by adding the SetSecurityStamp process after the ChangePassword step. The login works fine now. 

    Thanks again to both of you! 

    **

    Thank you both for responding, and Nadeeja for continued support.

    I have ended up using the following approach:

    I have created a workflow that changes the appropriate fields on the Portal Contact form to allow for the user to login (Username, login enabled, email confirmed (this may or may not stay)). I then set the contact's Web Role using the "Assign web Role" ADX Studio workflow. The last step, then, is to set/change the password for the contact. It's here that I am a bit stuck. ADX also provides a "Change Password" workflow (Dialog?) that would seem to be useful here, and in fact looks like it may work. However, upon changing the password and subsequently logging in with that contact, I get the "We're sorry, but something went wrong." message.

    I am trying to troubleshoot this as I feel that, since it has not invalidated the login as it has with other attempts using the "Password Reset" field, for example, this may be an approach that will end up working for me. But I am having some trouble getting the actual error that is occurring here.

    It seems important to note that, if I manually change the password for the Contact, the login is successful. Is there something here that I am missing, that might be otherwise obvious? Perhaps something that takes place in the process of changing the password manually?

    Thanks,

    Ken

    P.S.: Regarding the reasoning behind not using invitation redemption, for security purposes, we are limiting the outside registration of the user. This is a requirement from above me.  

  • Verified answer
    Colin V Profile Picture
    Colin V on at
    RE: ADX Studio Invitation Redemption and User Creation from CRM Invitation

    Hi Ken, is there some reason the invitation model doesn't work for you.  The invitation code is basically like a temporary password that is tied to a pre-existing contact.  It has many benefits rather than presetting a username and temp password, you allow the user to define their own username that they remember, or they can use any external provider that is configured.  Also with using a temporary password you are forcing them to type in or copy that password then change it right away.  With the invite code it is a simple link that they just click and set a new password right away.

    For user experience as well as no custom effort I would suggest you stick with the invite code method.

    Colin

  • Verified answer
    Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: ADX Studio Invitation Redemption and User Creation from CRM Invitation

    Hi KenRJk,

    You'll have to think creatively, if you want to reduce coding :).

    Here are some ideas.

    1. Create temporary password and email it to user

    2. Use a Custom state field to keep track of process (i.e. Temp Password Generated, Email Sent, Temp Password Used, Completed etc)

    3. Use Liquid to access user (contact) properties (community.adxstudio.com/.../liquid-templates)

    4. Using a custom form to change the custom state

    5. Using page redirection to force the user to the change password page.

    stackoverflow.com/.../how-to-have-users-change-their-passwords-after-the-first-login

    stackoverflow.com/.../asp-net-identity-2-0-temporary-password

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: ADX Studio Invitation Redemption and User Creation from CRM Invitation

    Thanks Nadeeja.

    To be clear, at a base level, I would like this process. I want to send an email to the user with a temporary password, that on their first log in, they need to change. 

    Similar functionality to that of logging into Windows for the first time.

    Thanks,

    Ken

  • Suggested answer
    Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: ADX Studio Invitation Redemption and User Creation from CRM Invitation

    Hi KenRJk,

    You can use the OOTB "Send Invitation" workflow to send the email with the invitation code.  OOTB you'll have to use the register page (i.e. portal.contoso.com/register;invitation={Invitation Code(Invitation)}) to redeem the invitation.  

    Adxstudio is built on top of ASP.NET Identity and provides same features.

    community.adxstudio.com/.../asp.net-identity-authentication

    You'll need further development to implement your requirement.  You may be able to use a different Web Page and a new but similar workflow to "Send Invitation" with a different URL to the new Web Page and handle the invitation code from that page.

    You can use JavaScript on the page to read the querystring value and handle it on the new Web Page.

    stackoverflow.com/.../how-can-i-get-query-string-values-in-javascript

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans