Skip to content

Commit 8d6a375

Browse files
authored
Merge pull request #1785 from Jackson-Woods/patch-3
Document maximum regex based claims transforms and related errors
2 parents eaedcb2 + 0fd4bfd commit 8d6a375

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

docs/identity-platform/jwt-claims-customization.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ If you need other transformations, submit your idea in the [feedback forum in Mi
9191

9292
## Regex-based claims transformation
9393

94+
You can use regular expressions to transform claims. A maximum of 20 total regex replacements can be made when using regex-based claims transformations.
95+
9496
The following image shows an example of the first level of transformation:
9597

9698
:::image type="content" source="./media/jwt-claims-customization/regexreplace-transform1.png" alt-text="Screenshot of the first level of transformation.":::

docs/identity-platform/reference-error-codes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ The `error` field has several possible values - review the protocol documentatio
206206
| AADSTS50161 | Failed to validate authorization url of external claims provider. |
207207
| AADSTS50162 | Claims transformation has timed out. This indicates too many or too complex transformations may have been configured for this application. A retry of the request may succeed. Otherwise, please contact your admin to fix the configuration. |
208208
| AADSTS50163 | Regular expression replacement for claims transformation has resulted in a claim which exceeds the size limit. Please contact your admin to fix the configuration.|
209+
| AADSTS501631 | Regular expression replacement for claims transformation results in too many replacements in the input sourceClaim. Please contact your admin to fix the configuration. |
210+
| AADSTS501632 | Regular expression replacement for claims transformation has too many substitution parameters in the replacement input parameter. Please contact your admin to fix the configuration. |
209211
| AADSTS50164 | The supplied access token was not issued for the purpose for which it is being used. Expected a token with purpose '{name}'. |
210212
| AADSTS50165 | The token encrypting algorithm '{algorithm}' requested by the application isn't supported for this type of token. This indicates the application is misconfigured. |
211213
| AADSTS50166 | Request to External OIDC endpoint failed. |

docs/identity-platform/saml-claims-customization.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ You can use the following functions to transform claims.
155155

156156
## Regex-based claims transformation
157157

158+
You can use regular expressions to transform claims. A maximum of 20 total regex replacements can be made when using regex-based claims transformations.
159+
158160
The following image shows an example of the first level of transformation:
159161

160162
:::image type="content" source="./media/saml-claims-customization/regexreplace-transform1.png" alt-text="Screenshot of the first level of transformation.":::
@@ -170,7 +172,7 @@ The actions listed in the following table provide information about the first le
170172
| `5` | `Add additional parameter` | More than one user attribute can be used for the transformation. The values of the attributes would then be merged with regex transformation output. Up to five more parameters are supported. |
171173
| `6` | `Replacement pattern` | The replacement pattern is the text template, which contains placeholders for regex outcome. All group names must be wrapped inside the curly braces such as `{group-name}`. Let's say the administration wants to use user alias with some other domain name, for example `xyz.com` and merge country name with it. In this case, the replacement pattern would be `{country}.{domain}@xyz.com`, where `{country}` is the value of input parameter and `{domain}` is the group output from the regular expression evaluation. In such a case, the expected outcome is `[email protected]`. |
172174

173-
The following image shows an example of the second level of transformation:
175+
The following image shows an example of the second level of transformation:
174176

175177
:::image type="content" source="./media/saml-claims-customization/regexreplace-transform2.png" alt-text="Screenshot of second level of claims transformation.":::
176178

0 commit comments

Comments
 (0)