Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Error with Azure AD sign in to Dynamics 365 Portal

Posted on by

Hi all,

I'm having a problem when signing into a newly created Dynamics 365 Portal (previously adxstudio portal). I have a list of contacts in my CRM instance, that I would like to use to assign logins in the portal, through Azure AD. The users are already added as an external user the Azure AD, and after attempting to sign in via the Azure AD, they receive the error "The email "xxx" is already taken."

I know the error is occuring because Dynamics 365 is trying to create them as a new contact within the system, however their email is already associated with a contact, so it's failing. Ideally, I'd like Dynamics to be able to associate the new portal log in with the contact already listed in the system, instead of creating a whole new contact for the person.


I've tried some suggestions online already (manually adding a Username & External Identity for the contact), however this just throws more "The x is already taken" errors.


If anyone has any advice then it'd be greatly appreciated.

Thanks,

Michael Searle

*This post is locked for comments

  • thomaspayne Profile Picture
    thomaspayne 75 on at
    RE: Error with Azure AD sign in to Dynamics 365 Portal

    Hi Michael

    There is a Site Setting under portals which allows you to link the new Azure AD login to the existing contact.

    Authentication/OpenIdConnect/AzureAD/AllowContactMappingWithEmail

    see documentation here docs.microsoft.com/.../azure-ad-b2c (I know linked to Azure AD B2C) but works with Azure AD, or local login as well

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error with Azure AD sign in to Dynamics 365 Portal

    Hi James,

    Even when the contact is not there in the CRM, It is showing as Email is already taken.

    Please suggest

  • Suggested answer
    RE: Error with Azure AD sign in to Dynamics 365 Portal

    Hello Talia

    Portal is going to find contact record using Unique ID (security stamp) ,for existing CRM contacts security stamp data will not be available, to update this data ,

    Third party apps like console app / logic app will be used, every time when ever contact is created at CRM end, third party app will help to update azure object ID (unique ID)  in contact entity security stamp field.

    let me know if you need any other info

    Thanks

    James

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error with Azure AD sign in to Dynamics 365 Portal

    Hi Emmaneul, could you explain what you mean by

    "By using any third party app we need to update Azure object ID(security Stamp) of a contact and external identity" ?

    Is this different than B2C? Is there any way to allow a partner's Azure AD tenet to be able to l

    og in via the Azure AD button already on our portal?

    Thanks,

    Talia

  • Suggested answer
    RE: Error with Azure AD sign in to Dynamics 365 Portal

    Hello Talia,

    We have two options to enable Azure AD authentication for existing CRM contacts (which is not created from Portal),  

    1) Sending Invitation Code to Contact emails and ask them to register

    2) By using any third party app we need to update Azure object ID(security Stamp) of a contact and external identity 

    Since running third party app is an TDS Job  on each and every contact creation we will use azure logic app to run the schedule job, I guess this brief intro will help you, let me know if you need any other help 

    Thanks

    James

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error with Azure AD sign in to Dynamics 365 Portal

    Hi Emmaneul,

    Could you explain this route for me? I'm encountering the same issue and am interested in a route other than sending an invitation. Thank you both for your answers,

    Talia

  • RE: Error with Azure AD sign in to Dynamics 365 Portal

    Thanks for the suggestions. I was able to solve this by using the invite feature; I did not realise that users can register via Azure AD after redeeming an invite link, which is the case.

    Thanks

  • Suggested answer
    RE: Error with Azure AD sign in to Dynamics 365 Portal

    Hello Michael,

    You can go with an schedule job / azure Logic app to communicate with Azure AD and fetch the object id of an contact and update it (this approach is working fine for us) , if you are fine with these approach please let me know so that i will help you.

    Thanks

    James

  • Verified answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Error with Azure AD sign in to Dynamics 365 Portal

    Hi Michael,

    The only way to link the existing contacts to CRM Portal is "Redeem Invitation".

    1. Send Portal Invitation to all the existing contacts through email.

    You can manually send Portal Invitation by running 'Send Invitation' workflow ondemand on all the existing contacts.

    2. Once user will receive an email, by clicking on invitation link they will be redirected to Portal 'Redeem Invitation' Page.

    3. Once 'Invitation Redeemed' user will be automatically redirected to 'Register' Page.

    4. Once Registered user will be redirected to 'Profile' page in order to complete the registration.

    5. Profile page will autopopulate the existing contact details. Once click on 'Update', this contact can start accessing the portal and its username/password will get linked to exsiting contact.

    This is the only way you can link your existing contacts to crm/adx portal.

    Please feel free to get in touch in case of any query.

    My Blog : [View:https://arpitmscrmhunt.blogspot.in]

    Cheers

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans