Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Looking for a smooth user experience when using Azure B2C in Dynamics Portal

(0) ShareShare
ReportReport
Posted on by 48

Anyone has one or more “invite only” portals, using Azure B2C and having it configured user friendly? I’m still not successful, feeling like I’m running around in circles…

Mostly because both the register and login functions in the portal use the same user flow in Azure. That works fine for a register-to-all portal,  but not to our invite-only portals I guess.

Requirements I have:

  • Multiple Powerapps Portals with their own CDS
  • SSO and one login
  • Registration for each Portal only on invite

 

The user experience now is:

  • I send an invite to an e-mail address
  • The potential user clicks the invite link and opens the Portal redeem invite page (why…. confusing page)
  • When redeeming the invite the Azure login is opened (not a separate registration user flow, also confusing to most users)
  • In the Azure login the “Register now” link has to be clicked to come to the final part of the registration (also confusing, most users stop registration here). Also the user has to be aware that he should use his existing login, if he has already one.

 

What also goes wrong in the user experience:

  • People click “Register now” in the Azure signin page, but do not have a registration code at all…
  • When they are logged in on portal 1 and surf to portal 2 themselves, without registering, they see the redeem invite page (confusing)

  • Olasan Profile Picture
    2 on at
    RE: Looking for a smooth user experience when using Azure B2C in Dynamics Portal

    We're now almost in 2023, and Microsoft has still not provided a smooth experience for this! However, I'm following your tip here, and it seems like I'm almost there, but not quite! You only have ONE application registration, right?

    I get the two buttons; but when using the new "register new" button, I do not get to the signup flow, but to a "page not found" on the portal - with the same URL as the redirect_uri og the FIRST b2c config.... <myportaldomain>/signin-aad-b2c_1 ... even though the redirectUri for the register connector is <myportaldomain>/signup-aad-b2c_2

    Any ideas?

  • Suggested answer
    Rajvinder Kaur Profile Picture
    5 on at
    RE: Looking for a smooth user experience when using Azure B2C in Dynamics Portal

    Thanks for sharing your answer. It worked for me too with few changes.

  • Suggested answer
    MRCBob Profile Picture
    55 on at
    RE: Looking for a smooth user experience when using Azure B2C in Dynamics Portal

    We actually came up to a solution but offcourse an unsupported one but works nicely.

    - In azure B2C have a seperate signin flow and register flow

    - In Dynamics CRM create 2 OpenIdconnect providers, one connected to the register and one to the signup. Create at least:

    Authentication/OpenIdConnect/AAD-B2C_2/Authority

    Authentication/OpenIdConnect/AAD-B2C_2/ClientId

    Authentication/OpenIdConnect/AAD-B2C_2/DefaultPolicyId

    Authentication/OpenIdConnect/AAD-B2C_2/RedirectUri

    Authentication/OpenIdConnect/AAD-B2C_2/Caption = Register

    - Set Authentication/Registration/OpenRegistrationEnabled to false

    Extend Authentication/OpenIdConnect/AAD-B2C_1/ValidIssuers with the new register flow issuer

    Now you basically should have 2 buttons to login/register. one puts you to the register flow, other to the Signin flow which you want to use.

    In the end set Authentication/Registration/LoginButtonAuthenticationType to the signin flow issuer url so when pressing Signin this goes to signinflow.

    When you use the portal page /Account/Login/Register?invitationCode=xxxxxxxxxxx you will see those buttons but the invite is not checked against CRM.

    We have hidden the buttons through javascript in the footer page, added code to basically do the check which is done on the normal register page and if succesfull run the action of the register button.

    AddInFooterWebTemplate.zip

    Finally: in CRM an external identitywill be registerd at the contact for the registerflow, for signin this needs to be the signin url, have a realtime workflow on External Identity which copy's the record into the signin record. The contact is not attached at creation but put in directly after creation, so set workflow to on created and field change "contact", check Like:

    If External Identity:Identity Provider contains [b2c_1_register] AND External Identity:Contact contains data, then: Create record with same values for contact and username but the idenity provider the Signin issuer.

    If you invite someone point the link to portal/Account/Login/Register?invitationCode=xxxxxxxx and they will end up in Register flow.

    It took some time but it works.

    Credits for the great supporter on this case.

  • Elowy GrootCRM Profile Picture
    48 on at
    RE: Looking for a smooth user experience when using Azure B2C in Dynamics Portal

    Hi Anna,

    Unfortunately, I didn't find a useful solution. So now we are using the local authentication. And hoping Microsoft will improve the B2C functionality in the future.

    Regards,

    Elowy.

  • Anna Peterson Profile Picture
    30 on at
    RE: Looking for a smooth user experience when using Azure B2C in Dynamics Portal

    Were you ever able to figure this out? I'm stuck in a very similar situation. Specifically, I want only invited contacts to be able to register through Azure AD B2C. 

  • MRCBob Profile Picture
    55 on at
    RE: Looking for a smooth user experience when using Azure B2C in Dynamics Portal

    Or having an option to point the register button to another UserFlow as the Logon button.

    Login button -> User SignIn Flow

    Register button -> User SignUp Flow

    Another Idea: point the user in e-mail to a UserRegister flow and having them redirect to the Register page and autofill the Invite code. But at some point the portal needs to know who you are offcourse.

    I have setup AzureB2C completely as well and we are migrating from OnPrem with local authentication to Online and thought hey use the new best options but this is not userfriendly indeed or are we missing something?

  • Elowy GrootCRM Profile Picture
    48 on at
    RE: Looking for a smooth user experience when using Azure B2C in Dynamics Portal

    Hi Nicholas,

    Thanks for your comment. I have customized the sign in/sign up page. But because I can only use one user flow with Azure, I have to include the "Register now" link in this page as well. And when other (not invited) people enter the page, they also see this "Register now" button, what makes it confusing.

    The project board for my project unfortunately decided to use the local login for both websites. And that one is deprecated, I know. But they don't see the Azure B2C login as a good alternative yet....

    Thanks again,

    Elowy.

  • Nicholas Hayduk Profile Picture
    2,863 on at
    RE: Looking for a smooth user experience when using Azure B2C in Dynamics Portal

    Hi Elowy,

    I don't have a great answer for you, just some comments.

    The challenge is that by using the local login feature of Azure AD B2C, you are effectively requiring that users register twice.  They need to redeem the invitation code on the Portal, and then they need to register a local account in Azure AD B2C.

    The Portal doesn't know (or care) what type of authentication is being used by Azure AD B2C.  When the Portal sends a user from the Redeem Invite page to Azure AD, it's not in the context of a registration/sign up - it's in the context of a sign in.  If they used a social identity like Facebook, they wouldn't need to register with Azure AD B2C, just login.

    Can you gone through the process of customizing the Azure AD B2C sign in and sign up pages (docs.microsoft.com/.../azure-ad-b2c  That might also help with any confusion as you can add your own messaging.

    One other small thing you might be able to try is having JavaScript that clicks the "Register" button automatically for the user when redeeming the invitation code.

    Interested to hear if anyone else has a good solve for this.

    Nick

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,233 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans