Skip to content

Commit a2f126f

Browse files
authored
Merge pull request #104305 from yoelhor/patch-5
Update claim-resolver-overview.md
2 parents c1f3cdb + 8d2f3d9 commit a2f126f

File tree

1 file changed

+42
-5
lines changed

1 file changed

+42
-5
lines changed

articles/active-directory-b2c/claim-resolver-overview.md

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Settings:
122122
1. The `IncludeClaimResolvingInClaimsHandling` metadata must set to `true`
123123
1. The input or output claims attribute `AlwaysUseDefaultValue` must set to `true`
124124

125-
## How to use claim resolvers
125+
## Claim resolvers samples
126126

127127
### RESTful technical profile
128128

@@ -138,12 +138,13 @@ The following example shows a RESTful technical profile:
138138
<Item Key="ServiceUrl">https://your-app.azurewebsites.net/api/identity</Item>
139139
<Item Key="AuthenticationType">None</Item>
140140
<Item Key="SendClaimsIn">Body</Item>
141+
<Item Key="IncludeClaimResolvingInClaimsHandling">true</Item>
141142
</Metadata>
142143
<InputClaims>
143-
<InputClaim ClaimTypeReferenceId="userLanguage" DefaultValue="{Culture:LCID}" />
144-
<InputClaim ClaimTypeReferenceId="policyName" DefaultValue="{Policy:PolicyId}" />
145-
<InputClaim ClaimTypeReferenceId="scope" DefaultValue="{OIDC:scope}" />
146-
<InputClaim ClaimTypeReferenceId="clientId" DefaultValue="{OIDC:ClientId}" />
144+
<InputClaim ClaimTypeReferenceId="userLanguage" DefaultValue="{Culture:LCID}" AlwaysUseDefaultValue="true" />
145+
<InputClaim ClaimTypeReferenceId="policyName" DefaultValue="{Policy:PolicyId}" AlwaysUseDefaultValue="true" />
146+
<InputClaim ClaimTypeReferenceId="scope" DefaultValue="{OIDC:scope}" AlwaysUseDefaultValue="true" />
147+
<InputClaim ClaimTypeReferenceId="clientId" DefaultValue="{OIDC:ClientId}" AlwaysUseDefaultValue="true" />
147148
</InputClaims>
148149
<UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" />
149150
</TechnicalProfile>
@@ -175,6 +176,17 @@ As a result Azure AD B2C sends the above parameters to the HTML content page:
175176
/selfAsserted.aspx?campaignId=hawaii&language=en-US&app=0239a9cc-309c-4d41-87f1-31288feb2e82
176177
```
177178

179+
### Content definition
180+
181+
In a [ContentDefinition](contentdefinitions.md) `LoadUri`, you can send claim resolvers to pull content from different places, based on the parameters used.
182+
183+
```XML
184+
<ContentDefinition Id="api.signuporsignin">
185+
<LoadUri>https://contoso.blob.core.windows.net/{Culture:LanguageName}/myHTML/unified.html</LoadUri>
186+
...
187+
</ContentDefinition>
188+
```
189+
178190
### Application Insights technical profile
179191

180192
With Azure Application Insights and claim resolvers you can gain insights on user behavior. In the Application Insights technical profile, you send input claims that are persisted to Azure Application Insights. For more information, see [Track user behavior in Azure AD B2C journeys by using Application Insights](analytics-with-application-insights.md). The following example sends the policy ID, correlation ID, language, and the client ID to Azure Application Insights.
@@ -192,3 +204,28 @@ With Azure Application Insights and claim resolvers you can gain insights on use
192204
</InputClaims>
193205
</TechnicalProfile>
194206
```
207+
208+
### Relying party policy
209+
210+
In a [Relying party](relyingparty.md) policy technical profile, you may want to send the tenant ID, or correlation ID to the relying party application.
211+
212+
```XML
213+
<RelyingParty>
214+
<DefaultUserJourney ReferenceId="SignUpOrSignIn" />
215+
<TechnicalProfile Id="PolicyProfile">
216+
<DisplayName>PolicyProfile</DisplayName>
217+
<Protocol Name="OpenIdConnect" />
218+
<OutputClaims>
219+
<OutputClaim ClaimTypeReferenceId="displayName" />
220+
<OutputClaim ClaimTypeReferenceId="givenName" />
221+
<OutputClaim ClaimTypeReferenceId="surname" />
222+
<OutputClaim ClaimTypeReferenceId="email" />
223+
<OutputClaim ClaimTypeReferenceId="objectId" PartnerClaimType="sub"/>
224+
<OutputClaim ClaimTypeReferenceId="identityProvider" />
225+
<OutputClaim ClaimTypeReferenceId="tenantId" AlwaysUseDefaultValue="true" DefaultValue="{Policy:TenantObjectId}" />
226+
<OutputClaim ClaimTypeReferenceId="correlationId" AlwaysUseDefaultValue="true" DefaultValue="{Context:CorrelationId}" />
227+
</OutputClaims>
228+
<SubjectNamingInfo ClaimType="sub" />
229+
</TechnicalProfile>
230+
</RelyingParty>
231+
```

0 commit comments

Comments
 (0)