Skip to content

Commit 07a3abb

Browse files
Merge pull request #249219 from tomkerkhove/tomkerkhove-patch-1-1
docs(apim): Provide documentation on token logic wrt custom header for validate-jwt/validate-azure-ad-token
2 parents 2c52c37 + ad19b91 commit 07a3abb

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ The `validate-azure-ad-token` policy enforces the existence and validity of a JS
6666
| failed-validation-error-message | Error message to return in the HTTP response body if the JWT doesn't pass validation. This message must have any special characters properly escaped. Policy expressions are allowed. | No | Default error message depends on validation issue, for example "JWT not present." |
6767
| output-token-variable-name | String. Name of context variable that will receive token value as an object of type [`Jwt`](api-management-policy-expressions.md) upon successful token validation. Policy expressions aren't allowed. | No | N/A |
6868

69-
70-
71-
72-
7369
## Elements
7470

7571
| Element | Description | Required |
@@ -96,6 +92,7 @@ The `validate-azure-ad-token` policy enforces the existence and validity of a JS
9692
### Usage notes
9793

9894
* You can use access restriction policies in different scopes for different purposes. For example, you can secure the whole API with Azure AD authentication by applying the `validate-azure-ad-token` policy on the API level, or you can apply it on the API operation level and use `claims` for more granular control.
95+
* When using a custom header (`header-name`), the header value cannot be prefixed with `Bearer ` and should be removed.
9996

10097
## Examples
10198

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ The `validate-jwt` policy enforces existence and validity of a supported JSON we
121121
* The policy supports tokens encrypted with symmetric keys using the following encryption algorithms: A128CBC-HS256, A192CBC-HS384, A256CBC-HS512.
122122
* To configure the policy with one or more OpenID configuration endpoints for use with a self-hosted gateway, the OpenID configuration endpoints URLs must also be reachable by the cloud gateway.
123123
* You can use access restriction policies in different scopes for different purposes. For example, you can secure the whole API with Azure AD authentication by applying the `validate-jwt` policy on the API level, or you can apply it on the API operation level and use `claims` for more granular control.
124+
* When using a custom header (`header-name`), the header value cannot be prefixed with `Bearer ` and should be removed.
124125

125126

126127
## Examples

0 commit comments

Comments
 (0)