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/develop/active-directory-jwt-claims-customization.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,8 @@ If you need other transformations, submit your idea in the [feedback forum in Az
98
98
99
99
## Regex-based claims transformation
100
100
101
+
The following image shows an example of the first level of transformation:
102
+
101
103
:::image type="content" source="./media/active-directory-jwt-claims-customization/regexreplace-transform1.png" alt-text="Screenshot of the first level of transformation.":::
102
104
103
105
The following table provides information about the first level of transformations. The actions listed in the table correspond to the labels in the previous image. Select **Edit** to open the claims transformation blade.
@@ -109,8 +111,9 @@ The following table provides information about the first level of transformation
109
111
| 3 | Treat source as multivalued | Some input user attributes can be multi-value user attributes. If the selected user attribute supports multiple values and the user wants to use multiple values for the transformation, they need to select **Treat source as multivalued**. If selected, all values are used for the regex match, otherwise only the first value is used. |
110
112
| 4 | Regex pattern | A regular expression that is evaluated against the value of user attribute selected as *Parameter 1*. For example a regular expression to extract the user alias from the user's email address would be represented as `(?'domain'^.*?)(?i)(\@fabrikam\.com)$`. |
111
113
| 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 additional parameters are supported. |
112
-
| 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]".
113
-
transformation**. |
114
+
| 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]`. |
115
+
116
+
The following image shows an example of the second level of transformation:
114
117
115
118
:::image type="content" source="./media/active-directory-jwt-claims-customization/regexreplace-transform2.png" alt-text="Screenshot of second level of claims transformation.":::
116
119
@@ -123,9 +126,11 @@ The following table provides information about the second level of transformatio
123
126
| 3 | Regex pattern |**Regex pattern** is the regular expression for the second level transformation. |
124
127
| 4 | Parameter input | User attribute inputs for the second level transformations. |
125
128
| 5 | Parameter input | Administrators can delete the selected input parameter if they don't need it anymore. |
126
-
| 6 | Replacement pattern | The replacement pattern is the text template, which contains placeholders for regex outcome group name, input parameter group name, and static text value. 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]". |
129
+
| 6 | Replacement pattern | The replacement pattern is the text template, which contains placeholders for regex outcome group name, input parameter group name, and static text value. 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]`. |
127
130
| 7 | Test transformation | The RegexReplace() transformation is evaluated only if the value of the selected user attribute for *Parameter 1* matches with the regular expression provided in the **Regex pattern** textbox. If they don't match, the default claim value is added to the token. To validate regular expression against the input parameter value, a test experience is available within the transform blade. This test experience operates on dummy values only. When additional input parameters are used, the name of the parameter is added to the test result instead of the actual value. To access the test section, select **Test transformation**. |
128
131
132
+
The following image shows an example of testing the transformations:
133
+
129
134
:::image type="content" source="./media/active-directory-jwt-claims-customization/regexreplace-transform3.png" alt-text="Screenshot of testing the transformation.":::
130
135
131
136
The following table provides information about testing the transformations. The actions listed in the table correspond to the labels in the previous image.
Copy file name to clipboardExpand all lines: articles/active-directory/develop/active-directory-saml-claims-customization.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,6 +145,8 @@ If you need other transformations, submit your idea in the [feedback forum in Az
145
145
146
146
## Regex-based claims transformation
147
147
148
+
The following image shows an example of the first level of transformation:
149
+
148
150
:::image type="content" source="./media/active-directory-jwt-claims-customization/regexreplace-transform1.png" alt-text="Screenshot of the first level of transformation.":::
149
151
150
152
The following table provides information about the first level of transformations. The actions listed in the table correspond to the labels in the previous image. Select **Edit** to open the claims transformation blade.
@@ -156,8 +158,9 @@ The following table provides information about the first level of transformation
156
158
| 3 | Treat source as multivalued | Some input user attributes can be multi-value user attributes. If the selected user attribute supports multiple values and the user wants to use multiple values for the transformation, they need to select **Treat source as multivalued**. If selected, all values are used for the regex match, otherwise only the first value is used. |
157
159
| 4 | Regex pattern | A regular expression that is evaluated against the value of user attribute selected as *Parameter 1*. For example a regular expression to extract the user alias from the user's email address would be represented as `(?'domain'^.*?)(?i)(\@fabrikam\.com)$`. |
158
160
| 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 additional parameters are supported. |
159
-
| 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]".
160
-
transformation**. |
161
+
| 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]`. |
162
+
163
+
The following image shows an example of the second level of transformation:
161
164
162
165
:::image type="content" source="./media/active-directory-jwt-claims-customization/regexreplace-transform2.png" alt-text="Screenshot of second level of claims transformation.":::
163
166
@@ -170,9 +173,11 @@ The following table provides information about the second level of transformatio
170
173
| 3 | Regex pattern |**Regex pattern** is the regular expression for the second level transformation. |
171
174
| 4 | Parameter input | User attribute inputs for the second level transformations. |
172
175
| 5 | Parameter input | Administrators can delete the selected input parameter if they don't need it anymore. |
173
-
| 6 | Replacement pattern | The replacement pattern is the text template, which contains placeholders for regex outcome group name, input parameter group name, and static text value. 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]". |
176
+
| 6 | Replacement pattern | The replacement pattern is the text template, which contains placeholders for regex outcome group name, input parameter group name, and static text value. 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]`. |
174
177
| 7 | Test transformation | The RegexReplace() transformation is evaluated only if the value of the selected user attribute for *Parameter 1* matches with the regular expression provided in the **Regex pattern** textbox. If they don't match, the default claim value is added to the token. To validate regular expression against the input parameter value, a test experience is available within the transform blade. This test experience operates on dummy values only. When additional input parameters are used, the name of the parameter is added to the test result instead of the actual value. To access the test section, select **Test transformation**. |
175
178
179
+
The following image shows an example of testing the transformations:
180
+
176
181
:::image type="content" source="./media/active-directory-jwt-claims-customization/regexreplace-transform3.png" alt-text="Screenshot of testing the transformation.":::
177
182
178
183
The following table provides information about testing the transformations. The actions listed in the table correspond to the labels in the previous image.
0 commit comments