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/app-provisioning/functions-for-customizing-application-data.md
+35-31Lines changed: 35 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -908,85 +908,85 @@ Replaces values within a string in a case-sensitive manner. The function behaves
908
908
#### Replace characters using a regular expression
909
909
**Example 1:** Using **oldValue** and **replacementValue** to replace the entire source string with another string.
910
910
911
-
Let’s say your HR system has an attribute `BusinessTitle`. As part of recent job title changes, your company wants to update anyone with the business title “Product Developer” to “Software Engineer”.
911
+
Let's say your HR system has an attribute `BusinessTitle`. As part of recent job title changes, your company wants to update anyone with the business title "Product Developer" to "Software Engineer".
912
912
Then in this case, you can use the following expression in your attribute mapping.
**Example 2:** Using **oldValue** and **template** to insert the source string into another *templatized* string.
922
922
923
923
The parameter **oldValue** is a misnomer in this scenario. It is actually the value that will get replaced.
924
-
Let’s say you want to always generate login id in the format `<username>@contoso.com`. There is a source attribute called **UserID** and you want that value to be used for the `<username>` portion of the login id.
924
+
Let's say you want to always generate login id in the format `<username>@contoso.com`. There is a source attribute called **UserID** and you want that value to be used for the `<username>` portion of the login id.
925
925
Then in this case, you can use the following expression in your attribute mapping.
**Example 3:** Using **regexPattern** and **replacementValue** to extract a portion of the source string and replace it with an empty string or a custom value built using regex patterns or regex group names.
935
935
936
-
Let’s say you have a source attribute `telephoneNumber` that has components `country code` and `phone number` separated by a space character. E.g. `+91 9998887777`
936
+
Let's say you have a source attribute `telephoneNumber` that has components `country code` and `phone number` separated by a space character. E.g. `+91 9998887777`
937
937
Then in this case, you can use the following expression in your attribute mapping to extract the 10 digit phone number.
You can also use this pattern to remove characters and collapse a string.
947
947
For example, the expression below removes parenthesis, dashes and space characters in the mobile number string and returns only digits.
948
948
949
949
`Replace([mobile], , "[()\\s-]+", , "", , )`
950
950
951
-
***source:**`[mobile] = “+1 (999) 888-7777”`
952
-
***regexPattern:**“`[()\\s-]+`”
953
-
***replacementValue:**“” (empty string)
951
+
***source:**`[mobile] = "+1 (999) 888-7777"`
952
+
***regexPattern:**"`[()\\s-]+`"
953
+
***replacementValue:**"" (empty string)
954
954
***Expression output:** 19998887777
955
955
956
956
**Example 4:** Using **regexPattern**, **regexGroupName** and **replacementValue** to extract a portion of the source string and replace it with another literal value or empty string.
957
957
958
-
Let’s say your source system has an attribute AddressLineData with two components street number and street name. As part of a recent move, let’s say the street number of the address changed and you want to update only the street number portion of the address line.
959
-
Then in this case, you can use the following expression in your attribute mapping to extract the 10 digit phone number.
958
+
Let's say your source system has an attribute AddressLineData with two components street number and street name. As part of a recent move, let's say the street number of the address changed and you want to update only the street number portion of the address line.
959
+
Then in this case, you can use the following expression in your attribute mapping to extract the street number.
**Example 5:** Using **regexPattern**, **regexGroupName** and **replacementAttributeName** to handle scenarios when the source attribute is empty or doesn’t have a value.
979
+
**Example 5:** Using **regexPattern**, **regexGroupName** and **replacementAttributeName** to handle scenarios when the source attribute is empty or doesn't have a value.
980
980
981
-
Let’s say your source system has an attribute telephoneNumber. If telephoneNumber is empty, you want to extract the 10 digits of the mobile number attribute.
981
+
Let's say your source system has an attribute telephoneNumber. If telephoneNumber is empty, you want to extract the 10 digits of the mobile number attribute.
982
982
Then in this case, you can use the following expression in your attribute mapping.
When **source** value matches a **key**, returns **value** for that **key**. If **source** value doesn't match any keys, returns **defaultValue**. **Key** and **value** parameters must always come in pairs. The function always expects an even number of parameters. The function should not be used for referential attributes such as manager.
1108
1108
1109
+
> [!NOTE]
1110
+
> Switch function performs a case-sensitive string comparison of the **source** and **key** values. If you'd like to perform a case-insensitive comparison, normalize the **source** string before comparison using a nested ToLower function and ensure that all **key** strings use lowercase.
1111
+
> Example: `Switch(ToLower([statusFlag]), "0", "true", "1", "false", "0")`. In this example, the **source** attribute `statusFlag` may have values ("True" / "true" / "TRUE"). However, the Switch function will always convert it to lowercase string "true" before comparison with **key** parameters.
Copy file name to clipboardExpand all lines: articles/active-directory/develop/zero-trust-for-developers.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,5 @@ The Microsoft identity platform app registration portal is the primary entry poi
79
79
80
80
## Next steps
81
81
82
-
- Zero Trust [Guidance Center](/security/zero-trust/)
83
-
- Zero Trust for the Microsoft identity platform developer [whitepaper](https://www.microsoft.com/security/content-library/Search?SearchDataFor=OJZgGWbHnB3Ll5hblDBugaEMQAchNfvkzk5X5AmPM4tK43NHpbF5%2Bky%2Fnuivl7plZz89b%2FuLMMZsMqKeYbhPPw%3D%3D&IsKeywordSearch=evXIpssXVY6lIm6X2K9ieA%3D%3D) (downloadable PDF).
82
+
- Zero Trust [Guidance Center](/security/zero-trust/)
84
83
- Microsoft identity platform [best practices and recommendations](./identity-platform-integration-checklist.md).
0 commit comments