Skip to content

Commit 8eef6f1

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into mac-native-vpn
2 parents 8ed8fbd + 9088b55 commit 8eef6f1

File tree

1,122 files changed

+7171
-23337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,122 files changed

+7171
-23337
lines changed

.openpublishing.redirection.json

Lines changed: 610 additions & 5 deletions
Large diffs are not rendered by default.

articles/active-directory-b2c/add-captcha.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,21 @@ You need more claims to enable CAPTCHA in your custom policy:
118118
<DisplayName>Flag indicating that the captcha was successfully solved</DisplayName>
119119
<DataType>boolean</DataType>
120120
</ClaimType>
121+
122+
<ClaimType Id="mfaCaptchaEnabled">
123+
<DisplayName>flag used to control captcha enabled in MFA</DisplayName>
124+
<DataType>string</DataType>
125+
</ClaimType>
126+
127+
<ClaimType Id="signupCaptchaEnabled">
128+
<DisplayName>flag used to control captcha enabled during signup</DisplayName>
129+
<DataType>string</DataType>
130+
</ClaimType>
131+
132+
<ClaimType Id="signinCaptchaEnabled">
133+
<DisplayName>flag used to control captcha enabled during signin</DisplayName>
134+
<DataType>string</DataType>
135+
</ClaimType>
121136
...
122137
<!--<ClaimsSchema>-->
123138
```
@@ -314,6 +329,58 @@ To enable CAPTCHA in MFA flow, you need to make an update in two technical profi
314329
...
315330
</TechnicalProfile>
316331
```
332+
333+
### Enable CAPTCHA feature flag
334+
335+
To enforce CAPTCHA during sign-up, sign-in, or MFA, you need to add a technical profile that enables a feature flag for each scenario, then call the technical profile in the user journey.
336+
337+
1. In the *TrustFrameworkBase.XML* file, locate the `ClaimsProviders` element and add the claims provider by using the following code:
338+
339+
```xml
340+
<!--<ClaimsProvider>-->
341+
...
342+
<ClaimsProvider>
343+
344+
<DisplayName>Set Feature Flags</DisplayName>
345+
346+
<TechnicalProfiles>
347+
348+
<TechnicalProfile Id="SetFeatureDefaultValue">
349+
<DisplayName>Set Feature Flags</DisplayName>
350+
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.ClaimsTransformationProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
351+
<OutputClaims>
352+
<OutputClaim ClaimTypeReferenceId="signupCaptchaEnabled" DefaultValue="true" />
353+
<OutputClaim ClaimTypeReferenceId="signinCaptchaEnabled" DefaultValue="true" />
354+
<OutputClaim ClaimTypeReferenceId="mfaCaptchaEnabled" DefaultValue="true" />
355+
</OutputClaims>
356+
</TechnicalProfile>
357+
</TechnicalProfiles>
358+
</ClaimsProvider>
359+
...
360+
<!--<ClaimsProviders>-->
361+
```
362+
363+
2. Set `DefaultValue` to true or false depending on the CAPTCHA scenario
364+
365+
3. Add the feature flags technical profile to the user journey then update the order of the rest of the orchestration steps.
366+
367+
```xml
368+
<!--<UserJourneys>-->
369+
...
370+
<UserJourney Id="SignUpOrSignIn">
371+
<OrchestrationSteps>
372+
373+
<!--Add this orchestration step-->
374+
<OrchestrationStep Order="1" Type="ClaimsExchange">
375+
<ClaimsExchanges>
376+
<ClaimsExchange Id="SetFeatureDefaultValue" TechnicalProfileReferenceId="SetFeatureDefaultValue" />
377+
</ClaimsExchanges>
378+
</OrchestrationStep>
379+
...
380+
<!--<UserJourneys>-->
381+
```
382+
383+
317384
## Upload the custom policy files
318385

319386
Use the steps in [Upload the policies](tutorial-create-user-flows.md?pivots=b2c-custom-policy&branch=pr-en-us-260336#upload-the-policies) to upload your custom policy files.

articles/active-directory-b2c/identity-provider-generic-saml-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ Upon an application sign-out request, Azure AD B2C attempts to sign out from you
422422

423423
## Debug SAML protocol
424424

425-
To help configure and debug federation with a SAML identity provider, you can use a browser extension for the SAML protocol, such as [SAML DevTools extension](https://chrome.google.com/webstore/detail/saml-devtools-extension/jndllhgbinhiiddokbeoeepbppdnhhio) for Chrome, [SAML-tracer](https://addons.mozilla.org/es/firefox/addon/saml-tracer/) for FireFox, or [Microsoft Edge or Internet Explorer developer tools](https://techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/gathering-a-saml-token-using-edge-or-ie-developer-tools/ba-p/320957).
425+
To help configure and debug federation with a SAML identity provider, you can use a browser extension for the SAML protocol, such as [SAML DevTools extension](https://chrome.google.com/webstore/detail/saml-devtools-extension/jndllhgbinhiiddokbeoeepbppdnhhio) for Chrome, [SAML-tracer](https://addons.mozilla.org/es/firefox/addon/saml-tracer/) for Firefox, or [Microsoft Edge or Internet Explorer developer tools](https://techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/gathering-a-saml-token-using-edge-or-ie-developer-tools/ba-p/320957).
426426

427427
Using these tools, you can check the integration between Azure AD B2C and your SAML identity provider. For example:
428428

articles/active-directory-b2c/troubleshoot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Use **Run now** and `https://jwt.ms` to test your policies independently of your
165165

166166
## Troubleshoot SAML protocol
167167

168-
To help configure and debug the integration with your service provider, you can use a browser extension for the SAML protocol, for example, [SAML DevTools extension](https://chrome.google.com/webstore/detail/saml-devtools-extension/jndllhgbinhiiddokbeoeepbppdnhhio) for Chrome, [SAML-tracer](https://addons.mozilla.org/es/firefox/addon/saml-tracer/) for FireFox, or [Edge or Internet Explorer developer tools](https://techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/gathering-a-saml-token-using-edge-or-ie-developer-tools/ba-p/320957).
168+
To help configure and debug the integration with your service provider, you can use a browser extension for the SAML protocol, for example, [SAML DevTools extension](https://chrome.google.com/webstore/detail/saml-devtools-extension/jndllhgbinhiiddokbeoeepbppdnhhio) for Chrome, [SAML-tracer](https://addons.mozilla.org/es/firefox/addon/saml-tracer/) for Firefox, or [Edge or Internet Explorer developer tools](https://techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/gathering-a-saml-token-using-edge-or-ie-developer-tools/ba-p/320957).
169169

170170
The following screenshot demonstrates how the SAML DevTools extension presents the SAML request Azure AD B2C sends to the identity provider, and the SAML response.
171171

articles/api-management/azure-openai-enable-semantic-caching.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ Configure the following policies to enable semantic caching for Azure OpenAI API
127127
<azure-openai-semantic-cache-lookup
128128
score-threshold="0.8"
129129
embeddings-backend-id="embeddings-deployment"
130+
embeddings-backend-auth="system-assigned"
130131
ignore-system-messages="true"
131132
max-message-count="10">
132133
<vary-by>@(context.Subscription.Id)</vary-by>

articles/api-management/azure-openai-semantic-cache-lookup-policy.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Use the `azure-openai-semantic-cache-lookup` policy to perform cache lookup of r
3434
<azure-openai-semantic-cache-lookup
3535
score-threshold="similarity score threshold"
3636
embeddings-backend-id ="backend entity ID for embeddings API"
37+
embeddings-backend-auth ="system-assigned"
3738
ignore-system-messages="true | false"
3839
max-message-count="count" >
3940
<vary-by>"expression to partition caching"</vary-by>
@@ -46,6 +47,7 @@ Use the `azure-openai-semantic-cache-lookup` policy to perform cache lookup of r
4647
| ----------------- | ------------------------------------------------------ | -------- | ------- |
4748
| score-threshold | Similarity score threshold used to determine whether to return a cached response to a prompt. Value is a decimal between 0.0 and 1.0. [Learn more](../azure-cache-for-redis/cache-tutorial-semantic-cache.md#change-the-similarity-threshold). | Yes | N/A |
4849
| embeddings-backend-id | [Backend](backends.md) ID for OpenAI embeddings API call. | Yes | N/A |
50+
| embeddings-backend-auth | Authentication used for Azure OpenAI embeddings API backend. | Yes. Must be set to `system-assigned`. | N/A |
4951
| ignore-system-messages | Boolean. If set to `true`, removes system messages from a GPT chat completion prompt before assessing cache similarity. | No | false |
5052
| max-message-count | If specified, number of remaining dialog messages after which caching is skipped. | No | N/A |
5153

articles/api-management/llm-semantic-cache-lookup-policy.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Use the `llm-semantic-cache-lookup` policy to perform cache lookup of responses
3434
<llm-semantic-cache-lookup
3535
score-threshold="similarity score threshold"
3636
embeddings-backend-id ="backend entity ID for embeddings API"
37+
embeddings-backend-auth ="system-assigned"
3738
ignore-system-messages="true | false"
3839
max-message-count="count" >
3940
<vary-by>"expression to partition caching"</vary-by>
@@ -46,6 +47,7 @@ Use the `llm-semantic-cache-lookup` policy to perform cache lookup of responses
4647
| ----------------- | ------------------------------------------------------ | -------- | ------- |
4748
| score-threshold | Similarity score threshold used to determine whether to return a cached response to a prompt. Value is a decimal between 0.0 and 1.0. [Learn more](../azure-cache-for-redis/cache-tutorial-semantic-cache.md#change-the-similarity-threshold). | Yes | N/A |
4849
| embeddings-backend-id | [Backend](backends.md) ID for OpenAI embeddings API call. | Yes | N/A |
50+
| embeddings-backend-auth | Authentication used for Azure OpenAI embeddings API backend. | Yes. Must be set to `system-assigned`. | N/A |
4951
| ignore-system-messages | Boolean. If set to `true`, removes system messages from a GPT chat completion prompt before assessing cache similarity. | No | false |
5052
| max-message-count | If specified, number of remaining dialog messages after which caching is skipped. | No | N/A |
5153

articles/api-management/validate-azure-ad-token-policy.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: dlepow
66

77
ms.service: azure-api-management
88
ms.topic: article
9-
ms.date: 07/23/2024
9+
ms.date: 01/29/2025
1010
ms.author: danlep
1111
---
1212

@@ -17,7 +17,7 @@ ms.author: danlep
1717
The `validate-azure-ad-token` policy enforces the existence and validity of a JSON web token (JWT) that was provided by the Microsoft Entra (formerly called Azure Active Directory) service for a specified set of principals in the directory. The JWT can be extracted from a specified HTTP header, query parameter, or value provided using a policy expression or context variable.
1818

1919
> [!NOTE]
20-
> To validate a JWT that was provided by an identity provider other than Microsoft Entra, API Management also provides the generic [`validate-jwt`](validate-jwt-policy.md) policy.
20+
> Use the generic [`validate-jwt`](validate-jwt-policy.md) policy to validate a JWT that was provided by an identity provider other than Microsoft Entra.
2121
2222
[!INCLUDE [api-management-policy-generic-alert](../../includes/api-management-policy-generic-alert.md)]
2323

@@ -33,24 +33,23 @@ The `validate-azure-ad-token` policy enforces the existence and validity of a JS
3333
failed-validation-httpcode="HTTP status code to return on failure"
3434
failed-validation-error-message="error message to return on failure"
3535
output-token-variable-name="name of a variable to receive a JWT object representing successfully validated token">
36-
<client-application-ids>
37-
<application-id>Client application ID from Microsoft Entra</application-id>
38-
<!-- If there are multiple client application IDs, then add additional application-id elements -->
39-
</client-application-ids>
4036
<backend-application-ids>
4137
<application-id>Backend application ID from Microsoft Entra</application-id>
4238
<!-- If there are multiple backend application IDs, then add additional application-id elements -->
4339
</backend-application-ids>
40+
<client-application-ids>
41+
<application-id>Client application ID from Microsoft Entra</application-id>
42+
<!-- If there are multiple client application IDs, then add additional application-id elements -->
43+
</client-application-ids>
4444
<audiences>
4545
<audience>audience string</audience>
4646
<!-- if there are multiple possible audiences, then add additional audience elements -->
4747
</audiences>
4848
<required-claims>
49-
<claim name="name of the claim as it appears in the token" match="all|any" separator="separator character in a multi-valued claim">
49+
<claim name="name of the claim as it appears in the token" match="all | any" separator="separator character in a multi-valued claim">
5050
<value>claim value as it is expected to appear in the token</value>
5151
<!-- if there is more than one allowed value, then add additional value elements -->
5252
</claim>
53-
<!-- if there are multiple possible allowed values, then add additional value elements -->
5453
</required-claims>
5554
<decryption-keys>
5655
<key certificate-id="mycertificate"/>
@@ -75,9 +74,9 @@ The `validate-azure-ad-token` policy enforces the existence and validity of a JS
7574

7675
| Element | Description | Required |
7776
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
78-
| audiences | Contains a list of acceptable audience claims that can be present on the token. If multiple `audience` values are present, then each value is tried until either all are exhausted (in which case validation fails) or until one succeeds. Policy expressions are allowed. | No |
7977
| backend-application-ids | Contains a list of acceptable backend application IDs. This is only required in advanced cases for the configuration of options and can generally be removed. Policy expressions aren't allowed. | No |
8078
| client-application-ids | Contains a list of acceptable client application IDs. If multiple `application-id` elements are present, then each value is tried until either all are exhausted (in which case validation fails) or until one succeeds. If a client application ID isn't provided, one or more `audience` claims should be specified. Policy expressions aren't allowed. | No |
79+
| audiences | Contains a list of acceptable audience claims that can be present on the token. If multiple `audience` values are present, then each value is tried until either all are exhausted (in which case validation fails) or until one succeeds. Policy expressions are allowed. | No |
8180
| required-claims | Contains a list of `claim` elements for claim values expected to be present on the token for it to be considered valid. When the `match` attribute is set to `all`, every claim value in the policy must be present in the token for validation to succeed. When the `match` attribute is set to `any`, at least one claim must be present in the token for validation to succeed. Policy expressions are allowed. | No |
8281
| decryption-keys | A list of [`key`](#key-attributes) subelements, used to decrypt a token signed with an asymmetric key. If multiple keys are present, then each key is tried until either all keys are exhausted (in which case validation fails) or a key succeeds.<br/><br/>Specify the public key using a `certificate-id` attribute with value set to the identifier of a certificate uploaded to API Management. | No |
8382

@@ -109,7 +108,7 @@ The `validate-azure-ad-token` policy enforces the existence and validity of a JS
109108

110109
### Simple token validation
111110

112-
The following policy is the minimal form of the `validate-azure-ad-token` policy. It expects the JWT to be provided in the default `Authorization` header using the `Bearer` scheme. In this example, the Microsoft Entra tenant ID and client application ID are provided using named values.
111+
The following policy is the minimal form of the `validate-azure-ad-token` policy. It expects the JWT to be provided in the default `Authorization` header using the `Bearer` scheme. In this example, the Microsoft Entra tenant ID and client application ID are provided using named values.
113112

114113
```xml
115114
<validate-azure-ad-token tenant-id="{{aad-tenant-id}}">
@@ -119,6 +118,21 @@ The following policy is the minimal form of the `validate-azure-ad-token` policy
119118
</validate-azure-ad-token>
120119
```
121120

121+
### Token validation using decryption key
122+
123+
This example shows how to use the `validate-azure-ad-token` policy to validate a token that is decrypted using a decryption key. The Microsoft Entra tenant ID and client application ID are provided using named values. The key is specified using the ID of an uploaded certificate (in PFX format) that contains the public key.
124+
125+
```xml
126+
<validate-azure-ad-token tenant-id="{{aad-tenant-id}}">
127+
<client-application-ids>
128+
<application-id>{{aad-client-application-id}}</application-id>
129+
</client-application-ids>
130+
<decryption-keys>
131+
<key certificate-id="mycertificate"/>
132+
</decryption-keys>
133+
</validate-azure-ad-token>
134+
```
135+
122136
### Validate that audience and claim are correct
123137

124138
The following policy checks that the audience is the hostname of the API Management instance and that the `ctry` claim is `US`. The Microsoft tenant ID is the well-known `organizations` tenant, which allows tokens from accounts in any organizational directory. The hostname is provided using a policy expression, and the client application ID is provided using a named value. The decoded JWT is provided in the `jwt` variable after validation.

articles/api-management/validate-jwt-policy.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ author: dlepow
66

77
ms.service: azure-api-management
88
ms.topic: article
9-
ms.date: 09/27/2024
9+
ms.date: 01/27/2025
1010
ms.author: danlep
1111
---
1212

1313
# Validate JWT
1414

1515
[!INCLUDE [api-management-availability-all-tiers](../../includes/api-management-availability-all-tiers.md)]
1616

17-
The `validate-jwt` policy enforces existence and validity of a supported JSON web token (JWT) extracted from a specified HTTP header, extracted from a specified query parameter, or matching a specific value.
17+
The `validate-jwt` policy enforces existence and validity of a supported JSON web token (JWT) that was provided by an identity provider. The JWT can be extracted from a specified HTTP header, extracted from a specified query parameter, or matching a specific value.
1818

1919
> [!NOTE]
20-
> To validate a JWT that was provided by the Microsoft Entra service, API Management also provides the [`validate-azure-ad-token`](validate-azure-ad-token-policy.md) policy.
20+
> Use the [`validate-azure-ad-token`](validate-azure-ad-token-policy.md) policy to validate a JWT that was provided by Microsoft Entra.
2121
2222
[!INCLUDE [api-management-policy-form-alert](../../includes/api-management-policy-form-alert.md)]
2323

@@ -206,6 +206,32 @@ The `validate-jwt` policy enforces existence and validity of a supported JSON we
206206
</validate-jwt>
207207
```
208208

209+
### Token validation using decryption key
210+
211+
This example shows how to use the `validate-jwt` policy to validate a token that is decrypted using a decryption key. The key is specified using the ID of an uploaded certificate (in PFX format) that contains the public key.
212+
213+
```xml
214+
<validate-jwt header-name="Authorization" require-scheme="Bearer" output-token-variable-name="jwt">
215+
<issuer-signing-keys>
216+
<key>{{jwt-signing-key}}</key> <!-- signing key is stored in a named value -->
217+
</issuer-signing-keys>
218+
<audiences>
219+
<audience>@(context.Request.OriginalUrl.Host)</audience>
220+
</audiences>
221+
<issuers>
222+
<issuer>contoso.com</issuer>
223+
</issuers>
224+
<required-claims>
225+
<claim name="group" match="any">
226+
<value>finance</value>
227+
<value>logistics</value>
228+
</claim>
229+
</required-claims>
230+
<decryption-keys>
231+
<key certificate-id="my-certificate-in-api-management" /> <!-- decryption key specified as certificate ID -->
232+
</decryption-keys>
233+
</validate-jwt>
234+
```
209235

210236
### Authorize access to operations based on token claims
211237

0 commit comments

Comments
 (0)