You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/active-directory-b2c/custom-policies-series-sign-up-or-sign-in-federation.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,15 +51,15 @@ Use the steps outlined in [Create the Facebook key](identity-provider-facebook.m
51
51
To configure sign in with Facebook, you need to perform the following steps:
52
52
53
53
- Declare more claims
54
-
- Define more claims transformations to help with claims manipulations such as creating *AlternativeSecurityId*.
54
+
- Define more claims transformations to help with claims manipulations such as creating `AlternativeSecurityId`.
55
55
- Configure Facebook claims provider
56
56
- Configure Microsoft Entra technical profiles to read and write the social account from and to the Microsoft Entra database.
57
57
- Configure a self-asserted technical profile (for accepting additional input from user or updating user details) and its content definition.
58
58
59
59
60
60
### Step 3.1 - Declare more claims
61
61
62
-
In the `ContosoCustomPolicy.XML` file, locate the *ClaimsSchema* section, and then declare more claims by using the following code:
62
+
In the `ContosoCustomPolicy.XML` file, locate the `ClaimsSchema` section, and then declare more claims by using the following code:
63
63
64
64
```xml
65
65
<!--<ClaimsSchema>-->
@@ -114,7 +114,7 @@ In the `ContosoCustomPolicy.XML` file, locate the *ClaimsSchema* section, and th
114
114
115
115
### Step 3.2 - Define claims transformations
116
116
117
-
In the `ContosoCustomPolicy.XML` file, locate the *ClaimsTransformations* element, and add claims transformations by using the following code:
117
+
In the `ContosoCustomPolicy.XML` file, locate the `ClaimsTransformations` element, and add claims transformations by using the following code:
118
118
119
119
```xml
120
120
<!--<ClaimsTransformations>-->
@@ -152,13 +152,13 @@ In the `ContosoCustomPolicy.XML` file, locate the *ClaimsTransformations* elemen
152
152
<!--</ClaimsTransformations>-->
153
153
```
154
154
155
-
We've defined three Claims Transformations, which we use to generate values for *alternativeSecurityId* and *userPrincipalName* claims. These ClaimsTransformations are invoked in the OAuth2 technical profile in [step 3.3](#step-33---configure-facebook-claims-provider).
155
+
We've defined three Claims Transformations, which we use to generate values for `alternativeSecurityId` and `userPrincipalName` claims. These ClaimsTransformations are invoked in the OAuth2 technical profile in [step 3.3](#step-33---configure-facebook-claims-provider).
156
156
157
157
### Step 3.3 - Configure Facebook claims provider
158
158
159
159
To enable users to sign in using a Facebook account, you need to define the account as a claims provider that Azure AD B2C can communicate with through an endpoint. You can define a Facebook account as a claims provider.
160
160
161
-
In the `ContosoCustomPolicy.XML` file, locate *ClaimsProviders* element, add a new claims provider by using the following code:
161
+
In the `ContosoCustomPolicy.XML` file, locate `ClaimsProviders` element, add a new claims provider by using the following code:
162
162
163
163
```xml
164
164
<!--<ClaimsProviders>-->
@@ -210,18 +210,18 @@ In the `ContosoCustomPolicy.XML` file, locate *ClaimsProviders* element, add a n
210
210
```
211
211
212
212
Replace:
213
-
-`facebook-app-id` with the value of Facebook *appID* you obtained in [step 1](#step-1---create-facebook-application).
213
+
-`facebook-app-id` with the value of Facebook `appID` you obtained in [step 1](#step-1---create-facebook-application).
214
214
-`facebook-policy-key` with the name of the Facebook policy key you obtained in [step 2](#step-2---create-facebook-policy-key).
215
215
216
-
Notice the claims transformations we defined in [step 3.2](#step-32---define-claims-transformations) in the *OutputClaimsTransformations* collection.
216
+
Notice the claims transformations we defined in [step 3.2](#step-32---define-claims-transformations) in the `OutputClaimsTransformations` collection.
### Step 3.4 - Create Microsoft Entra technical profiles
221
221
222
222
Just like in sign-in with a local account, you need to configure the [Microsoft Entra Technical Profiles](active-directory-technical-profile.md), which you use to connect to Microsoft Entra storage, to store or read a user social account.
223
223
224
-
1. In the `ContosoCustomPolicy.XML` file, locate the *Microsoft Entra ID-UserUpdate* technical profile and then add a new technical profile by using the following code:
224
+
1. In the `ContosoCustomPolicy.XML` file, locate the `AAD-UserUpdate` technical profile and then add a new technical profile by using the following code:
@@ -257,11 +257,11 @@ Just like in sign-in with a local account, you need to configure the [Microsoft
257
257
258
258
</TechnicalProfile>
259
259
```
260
-
We've added a new Microsoft Entra Technical Profile *AAD-UserWriteUsingAlternativeSecurityId* that writes a new social account into Microsoft Entra ID.
260
+
We've added a new Microsoft Entra Technical Profile `AAD-UserWriteUsingAlternativeSecurityId` that writes a new social account into Microsoft Entra ID.
261
261
262
262
1. Replace *B2C_1A_TokenSigningKeyContainer* with the token signing key you created in [Configure the signing](custom-policies-series-hello-world.md#step-1---configure-the-signing-and-encryption-keys).
263
263
264
-
1. In the `ContosoCustomPolicy.XML` file, add another Microsoft Entra technical profile after the *AAD-UserWriteUsingAlternativeSecurityId* Technical Profile by using the following code:
264
+
1. In the `ContosoCustomPolicy.XML` file, add another Microsoft Entra technical profile after the `AAD-UserWriteUsingAlternativeSecurityId` Technical Profile by using the following code:
@@ -290,15 +290,15 @@ Just like in sign-in with a local account, you need to configure the [Microsoft
290
290
</TechnicalProfile>
291
291
```
292
292
293
-
We've added a new Microsoft Entra Technical Profile *AAD-UserReadUsingAlternativeSecurityId* that reads a new social account from Microsoft Entra ID. It uses `alternativeSecurityId` as a unique identifier for the social account.
293
+
We've added a new Microsoft Entra Technical Profile `AAD-UserReadUsingAlternativeSecurityId` that reads a new social account from Microsoft Entra ID. It uses `alternativeSecurityId` as a unique identifier for the social account.
294
294
295
295
1. Replace *B2C_1A_TokenSigningKeyContainer* with the token signing key you created in [Configure the signing](custom-policies-series-hello-world.md#step-1---configure-the-signing-and-encryption-keys).
296
296
297
297
### Step 3.5 - Configure content definition
298
298
299
299
After a user signs in, you can collect some information from them by using a self-asserted technical profile. So, you need to configure content definition for the self-asserted technical profile.
300
300
301
-
In the `ContosoCustomPolicy.XML` file, locate the *ContentDefinitions* element, and then add a new content definition in the `ContentDefinitions` collection by using the following code:
301
+
In the `ContosoCustomPolicy.XML` file, locate the `ContentDefinitions` element, and then add a new content definition in the `ContentDefinitions` collection by using the following code:
@@ -316,7 +316,7 @@ We use this content definition as a metadata in a self-asserted technical profil
316
316
317
317
The self-asserted technical profile you configure in this step is used to collect more information from the user or update similar information obtained from the social account.
318
318
319
-
In the `ContosoCustomPolicy.XML` file, locate the *ClaimsProviders* section, and then add a new claims provider by using the following code:
319
+
In the `ContosoCustomPolicy.XML` file, locate the `ClaimsProviders` section, and then add a new claims provider by using the following code:
320
320
321
321
```xml
322
322
<!--<ClaimsProviders>-->
@@ -374,9 +374,9 @@ In the `ContosoCustomPolicy.XML` file, locate the *ClaimsProviders* section, and
374
374
<!--</ClaimsProviders>-->
375
375
```
376
376
377
-
The claims provider we've added contains a self-asserted technical profile, *SelfAsserted-Social*. The self-asserted technical profile uses the *AAD-UserWriteUsingAlternativeSecurityId* Technical Profile as a validation technical profile. So, the *AAD-UserWriteUsingAlternativeSecurityId* Technical Profile executes when the user selects the **Continue** button (see screenshot in [step 7](#step-7---test-policy)).
377
+
The claims provider we've added contains a self-asserted technical profile, `SelfAsserted-Social`. The self-asserted technical profile uses the `AAD-UserWriteUsingAlternativeSecurityId` Technical Profile as a validation technical profile. So, the `AAD-UserWriteUsingAlternativeSecurityId` Technical Profile executes when the user selects the **Continue** button (see screenshot in [step 7](#step-7---test-policy)).
378
378
379
-
Also, notice that we've added the content definition, *socialAccountsignupContentDefinition*, that we configured in [step 3.5](#step-35---configure-content-definition) in the metadata section.
379
+
Also, notice that we've added the content definition, `socialAccountsignupContentDefinition`, that we configured in [step 3.5](#step-35---configure-content-definition) in the metadata section.
380
380
381
381
## Step 4 - Update the User journey orchestration steps
382
382
@@ -438,21 +438,21 @@ In the orchestration, we've used make reference to technical profiles that enabl
438
438
439
439
When the custom policy runs:
440
440
441
-
-**Orchestration Step 1** - This step includes a *ClaimsProviderSelections* element, which lists the available sign-in options a user can choose from. In this case, we've only have one option, *FacebookExchange*, so when the policy runs, users are taken directly to Facebook.com in step 2 as shown by the `TargetClaimsExchangeId` attribute.
441
+
-**Orchestration Step 1** - This step includes a `ClaimsProviderSelections` element, which lists the available sign-in options a user can choose from. In this case, we've only have one option, `FacebookExchange`, so when the policy runs, users are taken directly to Facebook.com in step 2 as shown by the `TargetClaimsExchangeId` attribute.
442
442
443
-
-**Orchestration Step 2** - The *Facebook-OAUTH* technical profile executes, so the user is redirected to Facebook to sign in.
443
+
-**Orchestration Step 2** - The `Facebook-OAUTH` technical profile executes, so the user is redirected to Facebook to sign in.
444
444
445
-
-**Orchestration Step 3** - In step 3, the *AAD-UserReadUsingAlternativeSecurityId* technical profile executes to try to read the user social account from Microsoft Entra storage. If the social account is found, `objectId` is returned as an output claim.
445
+
-**Orchestration Step 3** - In step 3, the `AAD-UserReadUsingAlternativeSecurityId` technical profile executes to try to read the user social account from Microsoft Entra storage. If the social account is found, `objectId` is returned as an output claim.
446
446
447
447
-**Orchestration Step 4** - This step runs if the user doesn't already exist (`objectId` doesn't exist). It shows the form that collects more information from the user or updates similar information obtained from the social account.
448
448
449
-
-**Orchestration Step 5** - This step runs if the user doesn't already exist (`objectId` doesn't exist), so the *AAD-UserWriteUsingAlternativeSecurityId* Technical Profile executes to write the social account into Microsoft Entra ID.
449
+
-**Orchestration Step 5** - This step runs if the user doesn't already exist (`objectId` doesn't exist), so the `AAD-UserWriteUsingAlternativeSecurityId` Technical Profile executes to write the social account into Microsoft Entra ID.
450
450
451
451
-**Orchestration Step 6** - Finally, step 6 assembles and returns the JWT token at the end of the policy’s execution.
452
452
453
453
## Step 5 - Update relying party output claims
454
454
455
-
In the `ContosoCustomPolicy.XML` file, locate the *RelyingParty* element, and then replace all the output claims collection with the following code:
455
+
In the `ContosoCustomPolicy.XML` file, locate the `RelyingParty` element, and then replace all the output claims collection with the following code:
456
456
457
457
```xml
458
458
<OutputClaimClaimTypeReferenceId="displayName" />
@@ -514,7 +514,7 @@ Use the following steps to add a combined local and social account:
Copy file name to clipboardExpand all lines: articles/active-directory-b2c/custom-policies-series-store-user.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,12 +109,12 @@ You need to configure two [Microsoft Entra Technical Profile](active-directory-t
109
109
</TechnicalProfile>
110
110
```
111
111
112
-
We've added a new Microsoft Entra technical profile, *AAD-UserWrite*. You need to take note of the following important parts of the technical profile:
113
-
112
+
We've added a new Microsoft Entra technical profile, `AAD-UserWrite`. You need to take note of the following important parts of the technical profile:
113
+
114
114
- *Operation*: The operation specifies the action to be performed, in this case, *Write*. Learn more about other [operations in a Microsoft Entra technical provider](active-directory-technical-profile.md#azure-ad-technical-profile-operations).
115
-
115
+
116
116
- *Persisted claims*: The *PersistedClaims* element contains all of the values that should be stored into Microsoft Entra storage.
117
-
117
+
118
118
- *InputClaims*: The *InputClaims* element contains a claim, which is used to look up an account in the directory, or create a new one. There must be exactly one input claim element in the input claims collection for all Microsoft Entra technical profiles. This technical profile uses the *email* claim, as the key identifier for the user account. Learn more about [other key identifiers you can use uniquely identify a user account](active-directory-technical-profile.md#inputclaims).
119
119
120
120
@@ -276,7 +276,7 @@ After the policy finishes execution, and you receive your ID token, check that t
276
276
:::image type="content" source="media/custom-policies-series-store-user/screenshot-of-create-users-custom-policy.png" alt-text="A screenshot of creating a user account in Azure AD.":::
277
277
278
278
279
-
In our *Microsoft Entra ID-UserWrite* Microsoft Entra Technical Profile, we specify that if the user already exists, we raise an error message.
279
+
In our `AAD-UserWrite` Microsoft Entra Technical Profile, we specify that if the user already exists, we raise an error message.
280
280
281
281
Test your custom policy again by using the same **Email Address**. Instead of the policy executing to completion to issue an ID token, you should see an error message similar to the screenshot below.
Copy file name to clipboardExpand all lines: articles/active-directory-b2c/external-identities-videos.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,6 @@ Learn how to perform various use cases in Azure AD B2C.
35
35
36
36
| Video title | Video |Video title|Video|
37
37
|:------|:------|:------|:------|
38
-
|[Microsoft Entra ID: Monitoring and reporting Azure AD B2C using Azure Monitor](https://www.youtube.com/watch?v=Mu9GQy-CbXI&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=1) 6:57|[:::image type="icon" source="./media/external-identities-videos/monitoring-reporting.png" border="false":::](https://www.youtube.com/watch?v=Mu9GQy-CbXI&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=2)|[Azure AD B2C user migration using Microsoft Graph API](https://www.youtube.com/watch?v=9BRXBtkBzL4&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=5) 7:09|[:::image type="icon" source="./media/external-identities-videos/user-migration-msgraph-api.png" border="false":::](https://www.youtube.com/watch?v=9BRXBtkBzL4&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=6)|
38
+
|[Monitoring and reporting Azure AD B2C using Azure Monitor](https://www.youtube.com/watch?v=Mu9GQy-CbXI&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=1) 6:57|[:::image type="icon" source="./media/external-identities-videos/monitoring-reporting.png" border="false":::](https://www.youtube.com/watch?v=Mu9GQy-CbXI&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=2)|[Azure AD B2C user migration using Microsoft Graph API](https://www.youtube.com/watch?v=9BRXBtkBzL4&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=5) 7:09|[:::image type="icon" source="./media/external-identities-videos/user-migration-msgraph-api.png" border="false":::](https://www.youtube.com/watch?v=9BRXBtkBzL4&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=6)|
39
39
|[Azure AD B2C user migration strategies](https://www.youtube.com/watch?v=lCWR6PGUgz0&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=2) 8:22|[:::image type="icon" source="./media/external-identities-videos/user-migration-stratagies.png" border="false":::](https://www.youtube.com/watch?v=lCWR6PGUgz0&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=3)|[How to localize or customize language using Azure AD B2C](https://www.youtube.com/watch?v=yqrX5_tA7Ms&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=13) 20:41|[:::image type="icon" source="./media/external-identities-videos/language-localization.png" border="false":::](https://www.youtube.com/watch?v=yqrX5_tA7Ms&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=14)|
40
40
|[Configure monitoring: Azure AD B2C using Azure Monitor](https://www.youtube.com/watch?v=tF2JS6TGc3g&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=14) 17:23 |[:::image type="icon" source="./media/external-identities-videos/configure-monitoring.png" border="false":::](https://www.youtube.com/watch?v=tF2JS6TGc3g&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=15)|[Configuring custom domains in Azure AD B2C using Azure Front Door](https://www.youtube.com/watch?v=mVNB59VK-DQ&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=13) 19:45|[:::image type="icon" source="./media/external-identities-videos/configure-custom-domains.png" border="false":::](https://www.youtube.com/watch?v=mVNB59VK-DQ&list=PL3ZTgFEc7LyuJ8YRSGXBUVItCPnQz3YX0&index=14)|
Copy file name to clipboardExpand all lines: articles/active-directory-b2c/social-transformations.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ Adds an `AlternativeSecurityId` to an `alternativeSecurityIdCollection` claim. C
45
45
46
46
The following example links a new social identity with an existing account. To link a new social identity:
47
47
48
-
1. In the **Microsoft Entra ID-UserReadUsingAlternativeSecurityId** and **Microsoft Entra ID-UserReadUsingObjectId** technical profiles, output the user's **alternativeSecurityIds** claim.
48
+
1. In the `AAD-UserReadUsingAlternativeSecurityId` and `AAD-UserReadUsingObjectId` technical profiles, output the user's `alternativeSecurityIds` claim.
49
49
1. Ask the user to sign in with one of the identity providers that aren't associated with this user.
50
50
1. Using the **CreateAlternativeSecurityId** claims transformation, create a new **alternativeSecurityId** claim type with a name of `AlternativeSecurityId2`
51
51
1. Call the **AddItemToAlternativeSecurityIdCollection** claims transformation to add the **AlternativeSecurityId2** claim to the existing **AlternativeSecurityIds** claim.
@@ -190,7 +190,7 @@ Removes an **AlternativeSecurityId** from an **alternativeSecurityIdCollection**
190
190
191
191
The following example unlinks one of the social identities with an existing account. To unlink a social identity:
192
192
193
-
1. In the **AAD-UserReadUsingAlternativeSecurityId** and **AAD-UserReadUsingObjectId** technical profiles, output the user's **alternativeSecurityIds** claim.
193
+
1. In the `AAD-UserReadUsingAlternativeSecurityId` and `AAD-UserReadUsingObjectId` technical profiles, output the user's `alternativeSecurityIds` claim.
194
194
2. Ask the user to select which social account to remove from the list identity providers that are associated with this user.
195
195
3. Call a claims transformation technical profile that calls the **RemoveAlternativeSecurityIdByIdentityProvider** claims transformation, that removed the selected social identity, using identity provider name.
196
196
4. Persist the **alternativeSecurityIds** claim to the user account.
0 commit comments