Skip to content

Commit d066e90

Browse files
authored
Update custom-policy-configure-user-input.md
Jas feedback
1 parent e49d1d3 commit d066e90

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

articles/active-directory-b2c/custom-policy-configure-user-input.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ ms.subservice: B2C
1717

1818
[!INCLUDE [active-directory-b2c-advanced-audience-warning](../../includes/active-directory-b2c-advanced-audience-warning.md)]
1919

20-
In this article, you add a new user provided entry (a claim) to your sign-up or sign-in policy in Azure Active Directory B2C (Azure AD B2C). You configure a city entry as a dropdown, and define whether it's required.
20+
In this article, you will collect a new attribute during your sign-up journey in Azure Active Directory B2C (Azure AD B2C). You will obtain the users' City, configure it as a dropdown, and define whether it's required to be provided.
2121

2222
Gathering initial data from your users is achieved using the sign-up or sign-in user journey. Additional claims can be gathered later by using a profile edit user journey. Anytime Azure AD B2C gathers information directly from the user interactively, the Identity Experience Framework uses its [self-asserted technical profile](self-asserted-technical-profile.md). In this sample, you:
2323

24-
1. Define a city claim.
24+
1. Define a 'city' claim.
2525
1. Ask the user for their city.
26-
1. Persist the city to the user profile in Azure AD directory
27-
1. Read the city claim from the user profile.
28-
1. Return the city to your relying party application.
26+
1. Persist the city to the user profile in Azure AD B2C directory.
27+
1. Read the city claim from the user profile on each sign in.
28+
1. Return the city to your relying party application after sign in or sign up.
2929

3030
## Prerequisites
3131

32-
Complete the steps in [Get started with custom policies](custom-policy-get-started.md). You should have a working custom policy for sign-up and sign-in with local accounts.
32+
Complete the steps in [Get started with custom policies](custom-policy-get-started.md). You should have a working custom policy for sign-up and sign-in with social and local accounts.
3333

3434
## Define a claim
3535

@@ -40,7 +40,7 @@ A claim provides a temporary storage of data during an Azure AD B2C policy execu
4040
- **UserHelpText** - Helps the user understand what is required.
4141
- [UserInputType](claimsschema.md#userinputtype) - The type of input control, such as textbox, radio selection, drop-down list, or multiple selections.
4242

43-
Open the extensions file of your policy. For example, <em>`SocialAndLocalAccounts/`**`TrustFrameworkExtensions.xml`**</em>. This extensions file is one of the policy files included in the custom policy starter pack, which you should have obtained in the prerequisite, [Get started with custom policies](https://docs.microsoft.com/azure/active-directory-b2c/active-directory-b2c-get-started-custom).
43+
Open the extensions file of your policy. For example, <em>`SocialAndLocalAccounts/`**`TrustFrameworkExtensions.xml`**</em>.
4444

4545
1. Search for the [BuildingBlocks](buildingblocks.md) element. If the element doesn't exist, add it.
4646
1. Locate the [ClaimsSchema](claimsschema.md) element. If the element doesn't exist, add it.
@@ -61,13 +61,13 @@ Open the extensions file of your policy. For example, <em>`SocialAndLocalAccount
6161

6262
## Add a claim to the user interface
6363

64-
Following technical profiles are [self-asserted](self-asserted-technical-profile.md), where a user is expected to provide input:
64+
The following technical profiles are [self-asserted](self-asserted-technical-profile.md), invoked when a user is expected to provide input:
6565

6666
- **LocalAccountSignUpWithLogonEmail** - Local account sign-up flow.
6767
- **SelfAsserted-Social** - Federated account first-time user sign-in.
6868
- **SelfAsserted-ProfileUpdate** - Edit profile flow.
6969

70-
To add the city claim as an `<OutputClaim ClaimTypeReferenceId="city"/>` to the technical profiles, you override them in the extension policy. You specify the entire list of the output claims, to control the order the claims are presented on the screen. Find the **ClaimsProviders** element. Add a new ClaimsProviders as follows:
70+
To collect the City claim during Sign Up, it must be added as an output claim to the `LocalAccountSignUpWithLogonEmail` technical profile. Override this technical profile in the extension file. Specify the entire list of output claims to control the order the claims are presented on the screen. Find the **ClaimsProviders** element. Add a new ClaimsProviders as follows:
7171

7272
```xml
7373
<ClaimsProvider>
@@ -88,6 +88,10 @@ To add the city claim as an `<OutputClaim ClaimTypeReferenceId="city"/>` to the
8888
</TechnicalProfiles>
8989
</ClaimsProvider>
9090
<ClaimsProvider>
91+
```
92+
93+
To collect the City claim after initial sign in with Social Account, it must be added as an output claim to the `SelfAsserted-Social` technical profile. For Social Account users to be able to edit their profile data later, add the output claim to the `SelfAsserted-ProfileUpdate` technical profile. Override these technical profiles in the extension file. Specify the entire list of the output claims to control the order the claims are presented on the screen. Find the **ClaimsProviders** element. Add a new ClaimsProviders as follows:
94+
```xml
9195
<DisplayName>Self Asserted</DisplayName>
9296
<TechnicalProfiles>
9397
<!--Federated account first-time sign-in page-->
@@ -114,9 +118,10 @@ To add the city claim as an `<OutputClaim ClaimTypeReferenceId="city"/>` to the
114118

115119
## Read and write a claim
116120

117-
To persist the city to the user profile in the directory, you add `<PersistedClaim ClaimTypeReferenceId="city"/>` to the relevant technical profiles. To read the city from the user profile in the directory, you add `<OutputClaim ClaimTypeReferenceId="city"/>`.
121+
The following technical profiles are [Active Directory technical profile](active-directory-technical-profile.md), which read and write data to the Azure Active Directory.
122+
Use `PersistedClaims` to write data to the user profile and `OutputClaims` to read data from the user profile within the respective Active Directory technical profiles.
118123

119-
The following technical profiles are [Active Directory technical profile](active-directory-technical-profile.md), which read and write data to the Azure Active Directory. Find the **ClaimsProviders** element. Add a new ClaimsProviders as follows:
124+
Find the **ClaimsProviders** element. Add a new ClaimsProviders as follows:
120125

121126
```xml
122127
<ClaimsProvider>
@@ -158,9 +163,9 @@ The following technical profiles are [Active Directory technical profile](active
158163

159164
## Include a claim in the token
160165

161-
To return the city claim back to the relaying party application, add the `<OutputClaim ClaimTypeReferenceId="city" />` claim to the SignUpOrSignIn.xml file so that this claim is sent to the application in the token after a successful user journey. Modify the `TechnicalProfile Id="PolicyProfile"` element to add the city output claim as `<OutputClaim ClaimTypeReferenceId="city" />`.
166+
To return the city claim back to the relying party application, add an output claim to the <em>`SocialAndLocalAccounts/`**`SignUpOrSignIn.xml`**</em> file. This will issue the claim into the token after a successful user journey, and will be sent to the application. Modify the technical profile element within the relying party section to add the city as an output claim.
162167

163-
Your final relying party should look like following XML snippet:
168+
Your final relying party should look like the following:
164169

165170
```xml
166171
<RelyingParty>

0 commit comments

Comments
 (0)