How to manually create Contact record for external ID provider in Adxstudio

When configured to use an external ID provider (e.g. ADFS in our case), Adxstudio does not handle identity management functions such as creating user accounts in that external ID provider. When an external ID is authenticated and logged on to the Portal for the first time, Adxstudio automatically creates a new Contact record and associates it with the external ID.

Sometime you may want to customise this process. For example, you may want to do something like this:

  1. Create the Contact record first upon registration request
  2. Email user to confirm email address
  3. Provision user account in ADFS once user has confirmed email address (password may also be provided at this point)
  4. Link Contact record to ADFS account

Step 4 would require you to make appropriate update to the Contact record so that the Adxstudio Portal web app (the MVC app) can establish the link between the Contact record and the currently logon identity.

In order to achieve this you would need to update the following fields on the Contact record:

Field Value
Username (adx_identity_username) The ADFS account username, e.g. mydomain\user1
Login Enabled (adx_identity_logonenabled) True
Security Stamp (adx_identity_securitystamp) A GUID – seems that any GUID will do
Profile Modified On (adx_profilemodifiedon) If a value is not specified, the user will be taken to the Profile page upon login.

You also need to create an External Identity (adx_externalidentity) record and associate it with the Contact.

The fields for this record are:

Field Value
Contact (adx_contactid) The associated Contact record
Username (adx_username) The ADFS account username, e.g. mydomain\user1
Identity Provider (adx_identityprovidername) As we were using ADFS, we set this value to be the same as the value for the Authentication/WsFederation/ADFS/AuthenticationType Site Setting in CRM.

Also note that Adxstudio adds a new form for the Contact entity in CRM, namely Portal Contact. You can use this form to view and update the fields above.


About Bernado

Based in Australia, I am a freelance SharePoint and Dynamics CRM developer. I love developing innovative solutions that address business and everyday problems. Feel free to contact me if you think I can help you with your SharePoint or CRM implementation.
This entry was posted in Adxstudio, CRM Portal. Bookmark the permalink.

5 Responses to How to manually create Contact record for external ID provider in Adxstudio

  1. Deepak says:

    I have an exactly the same need but using AD B2C. Can you share some thoughts on how to achieve the step 2. Email user to confirm email address.
    I am able to achieve all the steps apart from sending an email. It will be of great help if you could shed some thoughts on this.


    • Bernado says:

      Hi Deepak,

      For step 2, we implemented a workflow in CRM that runs on creation of Contact. We use this workflow to send the email.

      Hope that helps.

      • Deepak says:

        Hello Bernado

        Thanks for your quick reply.

        We are also trying to to use ‘send confirmation email’ workflow. But we are struggling to get the parameter properties input. It will be great if you could help identify URLcode,userid etc.

        Did you use a different workflow?


      • Bernado says:

        Hey Deepak,

        The OOTB registration/invitation thing in CRM Portal didn’t meet our requirements so we basically rolled our own. We developed a custom REST service to create the Contacts and AD accounts. Our CRM workflow that sends the confirmation email is also custom.

  2. anilambadan says:

    Hi Bernado,

    Thank you very much for the useful post.

    I’m facing a similar scenario as described above but with Azure AD. When the system creating the ‘External identity’ record its putting a random string like ‘PNcFIHn9ZAVcmKwCQmEKz_fAK74qahHo2jQ7e704dZk’ as user name. I want to create this record manually but not sure how to find out the value to map this field. I think it should be mapped to some value on Azure AD user.

    It will be of great help if you could shed some thoughts on this.


Leave a Reply

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

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

Facebook photo

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

Connecting to %s