Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Azure B2C Invitation

Hi Folks


We're using the built-in form based authentication for Dynamics 365 portals. Portal users/contacts get email invite, having the invitation code. My invitation workflow (customized the default) also assign web role to this user and also assign him to an account.


We want to move to Azure B2C and also using the same process like creating invite email for the portal users. How can this be achieved.


Would really appreciate.

@OliverRodrigues @Fubar @OOlashyn 


Helper II
Helper II

Go into Azure > Subscriptions > [Your Subscription] > Settings > Resource Providers > Microsoft.AzureActiveDirectory > Register (otherwise creating B2C will give you an error).

  1. Create a new Resource Group called BusinessToCustomer
  2. Create a new resource: Azure Active Directory B2C

Step 1: Create a new Azure AD B2C Tenant

  • Your company name
  • Subscripton Name
  • Your Resource Group (in my case, BusinessToCustomer)

Step 2: Link an existing Azure AD B2C Tentant to my Azure Subscription

  • ONLY DO THIS if you did not specify a subscription / resource group when creating the resource


Step 3:

Register Azure B2C to work with Customer Portal

Automatic configuration is no longer a thing. The documentation is out of date, even though it says it was updated recently.

NOTE that this procedure is not quite straightforward. There are some things that you will need to change. For example, it says you need to check just the ID Tokens box, but you should also check the Access Tokens box or the Customer Portal will tell you that Azure B2C Sign in Failed because Implicit Authentication is not allowed.


Create user flows for sign-up / sign-in and password resets under Home > Azure AD B2C > Policies > User Flows






If you wanted to collect info during sign up, you would do it in the signup / signin flow.

Change the token compatibility settings to the second version (Azure AD B2C > Your flow > Properties > Token Compatibility Settings > Issuer (iss) claim







Azure will authenticate to this address:



If you want to add an address, do it in the B2C settings by adding an extra URI to authenticate to.


Here were my final settings upon configuration of Azure B2C with the TEST customer portal:




Registration enabled = false. That way, people can only register for the portal if there is an existing contact in our system for them.



External logout = false so it would keep them on the portal page once they sign out, instead of redirecting them to the external Azure B2C signout page.



Contact mapping with email = true means the contacts will be mapped to their unique email.







ALSO, when you make changes to the authentication settings in the portal, you have to restart the portal (Portal Settings > Administration > Portal Actions > Restart) for them to take effect effectively. Otherwise you'll be left wondering a few hours in the future why your changes didn't apply.




Customizing the sign in pages to look nice:



Go into the Azure B2C User Flows settings, select the flow, and go to Customize > Page Layouts. Here you can customize things.



FYI if you got through all of this, there are still a bunch of things left to configure but this post will get extremely long, so I'll leave it for next time.

Helper II
Helper II

Also wanted to add that if you have Azure B2C set as default and have your invitations configured, then the invitation code will automatically redirect to Azure B2C. However if you have an existing contact you're sending an invitation for, the "sign up" flow will fail because the contact already exists. The way to bypass this is by using the "Password Reset" flow instead of the "sign up" flow. Just edit the HTML / CSS of the Password Reset page to make it look like a sign up page.

Great work! This needs to be a blog post 🙂

Glad I can save someone some time, I sure spent quite a bit of my time when I first tried to configure Azure B2C. The documentation is fragmented and there isn't really a consolidated step by step document I could find.

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Are Your Ready?

Test your skills now with the Cloud Skill Challenge.


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (44,114)