Set up a profile editing flow in Azure Active Directory B2C
Before you begin, use the Choose a policy type selector at the top of this page to choose the type of policy you’re setting up. Azure Active Directory B2C offers two methods to define how users interact with your applications: through predefined user flows or through fully configurable custom policies. The steps required in this article are different for each method.
Profile editing flow
Profile editing policy lets users manage their profile attributes, like display name, surname, given name, city, and others. The profile editing flow involves following steps:
- Sign-up or sign-in, with local or social account. If the session is still active, Azure AD B2C authorizes the user, and skips to the next step.
- Azure AD B2C reads the user profile from the directory, and let the user edit the attributes.
Prerequisites
If you haven't already done so, register a web application in Azure Active Directory B2C.
Create a profile editing user flow
If you want to enable users to edit their profile in your application, you use a profile editing user flow.
In the menu of the Azure AD B2C tenant overview page, select User flows, and then select New user flow.
On the Create a user flow page, select the Profile editing user flow.
Under Select a version, select Recommended, and then select Create.
Enter a Name for the user flow. For example, profileediting1.
Under Identity providers select at least one identity provider:
- Under Local accounts, select one of the following: Email signin, User ID signin, Phone signin, Phone/Email signin, User ID/Email signin, or None. Learn more.
- Under Social identity providers, select any of the external social or enterprise identity providers you've set up. Learn more.
Under Multifactor authentication, if you want to require users to verify their identity with a second authentication method, choose the method type and when to enforce multi-factor authentication (MFA). Learn more.
Under Conditional access, if you've configured Conditional Access policies for your Azure AD B2C tenant and you want to enable them for this user flow, select the Enforce conditional access policies check box. You don't need to specify a policy name. Learn more.
Under User attributes, choose the attributes that you want the customer to be able to edit in their profile. For the full list of values, select Show more, choose the values, and then select OK.
Select Create to add the user flow. A prefix of B2C_1 is automatically appended to the name.
Test the user flow
- Select the user flow you created to open its overview page, then select Run user flow.
- For Application, select the web application named webapp1 that you previously registered. The Reply URL should show
https://jwt.ms
. - Click Run user flow, and then sign in with the account that you previously created.
- You now have the opportunity to change the display name and job title for the user. Click Continue. The token is returned to
https://jwt.ms
and should be displayed to you.
Create a profile editing policy
Custom policies are a set of XML files you upload to your Azure AD B2C tenant to define user journeys. We provide starter packs with several pre-built policies including: sign-up and sign-in, password reset, and profile editing policy. For more information, see Get started with custom policies in Azure AD B2C.