Updates from: 01/18/2022 02:04:14
Service Microsoft Docs article Related commit history on GitHub Change details
active-directory-b2c Billing https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/active-directory-b2c/billing.md
Previously updated : 01/14/2022 Last updated : 01/17/2022
A subscription linked to an Azure AD B2C tenant can be used for the billing of A
After you complete these steps for an Azure AD B2C tenant, your Azure subscription is billed based on your Azure Direct or Enterprise Agreement details, if applicable. + ## Change your Azure AD pricing tier A tenant must be linked to the appropriate Azure pricing tier based on the features you want to use with your Azure AD B2C tenant. Premium features require Azure AD B2C Premium P1 or P2, as described in the [Azure Active Directory B2C pricing](https://azure.microsoft.com/pricing/details/active-directory-b2c/).
To change your pricing tier, follow these steps:
![Screenshot that shows how to select the pricing tier.](media/billing/select-tier.png)
+> [!NOTE]
+> Currently, Azure AD Premium P1 for Azure AD B2C is the default pricing tier, and it's equivalent to Azure AD Free tier, but it costs money. Therefore, in terms of features, Azure AD Premium P1 license applied to Azure AD tenant, is not equivalent to Azure AD B2C Premium P1 license in a B2C tenant, and the same is true for Premium P2. Hence, you expect that some features available in Azure AD tenant may be missing in Azure AD B2C even when the tenants have Azure AD Premium P2 and Azure AD B2C Premium P2 licenses respectively. For instance, Azure AD Premium P2 offers identity protection in Azure AD B2C tenants, but does not offer other Azure AD Premium P2 features that apply to Azure AD tenants.
+ ## Switch to MAU billing (pre-November 2019 Azure AD B2C tenants) If you linked your Azure AD B2C tenant to a subscription before **November 1, 2019**, the previous per-authentication billing model is being used. We recommend you upgrade to the monthly active users (MAU) billing model. Billing options are configured in your Azure AD B2C resource.
active-directory-b2c Boolean Transformations https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/active-directory-b2c/boolean-transformations.md
Previously updated : 06/06/2020 Last updated : 01/17/2022 # Boolean claims transformations -
-This article provides examples for using the boolean claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [ClaimsTransformations](claimstransformations.md).
+This article provides examples for using the boolean claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [claims transformations](claimstransformations.md).
## AndClaims
-Performs an And operation of two boolean inputClaims and sets the outputClaim with result of the operation.
+Computes an `And` operation of two boolean input claims, and sets the output claim with result of the operation.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
|-| | - | -- |
-| InputClaim | inputClaim1 | boolean | The first ClaimType to evaluate. |
-| InputClaim | inputClaim2 | boolean | The second ClaimType to evaluate. |
-|OutputClaim | outputClaim | boolean | The ClaimTypes that will be produced after this claims transformation has been invoked (true or false). |
+| InputClaim | inputClaim1 | boolean | The first claim to evaluate. |
+| InputClaim | inputClaim2 | boolean | The second claim to evaluate. |
+|OutputClaim | outputClaim | boolean | The claim that will be produced after this claims transformation has been invoked (true or false). |
+
-The following claims transformation demonstrates how to And two boolean ClaimTypes: `isEmailNotExist`, and `isSocialAccount`. The output claim `presentEmailSelfAsserted` is set to `true` if the value of both input claims are `true`. In an orchestration step, you can use a precondition to preset a self-asserted page, only if a social account email is empty.
+### Example of AndClaims
+
+The following claims transformation demonstrates how to `And` two boolean claims: `isEmailNotExist`, and `isSocialAccount`. The output claim `presentEmailSelfAsserted` is set to `true` if the values of both input claims are `true`.
```xml <ClaimsTransformation Id="CheckWhetherEmailBePresented" TransformationMethod="AndClaims">
The following claims transformation demonstrates how to And two boolean ClaimTyp
</ClaimsTransformation> ```
-### Example of AndClaims
- - Input claims:
- - **inputClaim1**: true
- - **inputClaim2**: false
+ - **inputClaim1**: true
+ - **inputClaim2**: false
- Output claims:
- - **outputClaim**: false
+ - **outputClaim**: false
## AssertBooleanClaimIsEqualToValue Checks that boolean values of two claims are equal, and throws an exception if they are not.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | | - | -- |
-| inputClaim | inputClaim | boolean | The ClaimType to be asserted. |
+| inputClaim | inputClaim | boolean | The claim to be checked. |
| InputParameter |valueToCompareTo | boolean | The value to compare (true or false). | The **AssertBooleanClaimIsEqualToValue** claims transformation is always executed from a [validation technical profile](validation-technical-profile.md) that is called by a [self-asserted technical profile](self-asserted-technical-profile.md). The **UserMessageIfClaimsTransformationBooleanValueIsNotEqual** self-asserted technical profile metadata controls the error message that the technical profile presents to the user. The error messages can be [localized](localization-string-ids.md#claims-transformations-error-messages). ![AssertStringClaimsAreEqual execution](./media/boolean-transformations/assert-execution.png)
-The following claims transformation demonstrates how to check the value of a boolean ClaimType with a `true` value. If the value of the `accountEnabled` ClaimType is false, an error message is thrown.
+### Example of AssertBooleanClaimIsEqualToValue
+
+The following claims transformation demonstrates how to check the value of a boolean claim with a `true` value. If the value of the `accountEnabled` claim is false, an error message is thrown.
```xml <ClaimsTransformation Id="AssertAccountEnabledIsTrue" TransformationMethod="AssertBooleanClaimIsEqualToValue">
The following claims transformation demonstrates how to check the value of a boo
</ClaimsTransformation> ```
+- Input claims:
+ - **inputClaim**: false
+ - **valueToCompareTo**: true
+- Result: Error thrown
+
+### Calling the AssertBooleanClaimIsEqualToValue claims transformation
-The `login-NonInteractive` validation technical profile calls the `AssertAccountEnabledIsTrue` claims transformation.
+The following `Example-AssertBoolean` validation technical profile calls the `AssertAccountEnabledIsTrue` claims transformation.
```xml
-<TechnicalProfile Id="login-NonInteractive">
- ...
+<TechnicalProfile Id="Example-AssertBoolean">
+ <DisplayName>Unit test</DisplayName>
+ <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.ClaimsTransformationProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
+ <OutputClaims>
+ <OutputClaim ClaimTypeReferenceId="ComparisonResult" DefaultValue="false" />
+ </OutputClaims>
<OutputClaimsTransformations> <OutputClaimsTransformation ReferenceId="AssertAccountEnabledIsTrue" /> </OutputClaimsTransformations>
+ <UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" />
</TechnicalProfile> ```
-The self-asserted technical profile calls the validation **login-NonInteractive** technical profile.
+The self-asserted technical profile calls the validation `Example-AssertBoolean` technical profile.
```xml
-<TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email">
+<TechnicalProfile Id="SelfAsserted-AssertDateTimeIsGreaterThan">
+ <DisplayName>Example</DisplayName>
+ <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
+ <Item Key="ContentDefinitionReferenceId">api.selfasserted</Item>
<Item Key="UserMessageIfClaimsTransformationBooleanValueIsNotEqual">Custom error message if account is disabled.</Item> </Metadata>
+ ...
<ValidationTechnicalProfiles>
- <ValidationTechnicalProfile ReferenceId="login-NonInteractive" />
+ <ValidationTechnicalProfile ReferenceId="Example-AssertBoolean" />
</ValidationTechnicalProfiles> </TechnicalProfile> ```
-### Example of AssertBooleanClaimIsEqualToValue
--- Input claims:
- - **inputClaim**: false
- - **valueToCompareTo**: true
-- Result: Error thrown- ## CompareBooleanClaimToValue Checks that boolean value of a claim is equal to `true` or `false`, and return the result of the compression.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | | - | -- |
-| InputClaim | inputClaim | boolean | The ClaimType to be asserted. |
+| InputClaim | inputClaim | boolean | The claim to be compared. |
| InputParameter |valueToCompareTo | boolean | The value to compare (true or false). |
-| OutputClaim | compareResult | boolean | The ClaimType that is produced after this ClaimsTransformation has been invoked. |
+| OutputClaim | compareResult | boolean | The claim that is produced after this claims transformation has been invoked. |
+
+### Example of CompareBooleanClaimToValue
-The following claims transformation demonstrates how to check the value of a boolean ClaimType with a `true` value. If the value of the `IsAgeOver21Years` ClaimType is equal to `true`, the claims transformation returns `true`, otherwise `false`.
+The following claims transformation demonstrates how to check the value of a boolean claim with a `true` value. If the value of the `IsAgeOver21Years` claim is equal to `true`, the claims transformation returns `true`, otherwise `false`.
```xml <ClaimsTransformation Id="AssertAccountEnabled" TransformationMethod="CompareBooleanClaimToValue">
The following claims transformation demonstrates how to check the value of a boo
</ClaimsTransformation> ```
-### Example of CompareBooleanClaimToValue
- - Input claims:
- - **inputClaim**: false
+ - **inputClaim**: false
- Input parameters:
- - **valueToCompareTo**: true
+ - **valueToCompareTo**: true
- Output claims:
- - **compareResult**: false
+ - **compareResult**: false
## NotClaims
-Performs a Not operation of the boolean inputClaim and sets the outputClaim with result of the operation.
+Computes a `Not` operation of the boolean input claim and sets the output claim with result of the operation.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim | boolean | The claim to be operated. |
-| OutputClaim | outputClaim | boolean | The ClaimTypes that are produced after this ClaimsTransformation has been invoked (true or false). |
+| OutputClaim | outputClaim | boolean | The claim that is produced after this claims transformation has been invoked (true or false). |
+
+### Example of NotClaims
-Use this claim transformation to perform logical negation on a claim.
+The following claims transformation demonstrates how to perform logical negation on a claim.
```xml <ClaimsTransformation Id="CheckWhetherEmailBePresented" TransformationMethod="NotClaims">
Use this claim transformation to perform logical negation on a claim.
</ClaimsTransformation> ```
-### Example of NotClaims
- - Input claims:
- - **inputClaim**: false
+ - **inputClaim**: false
- Output claims:
- - **outputClaim**: true
+ - **outputClaim**: true
## OrClaims
-Computes an Or of two boolean inputClaims and sets the outputClaim with result of the operation.
+Computes an `Or` of two boolean claims and sets the output claim with result of the operation.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | inputClaim1 | boolean | The first ClaimType to evaluate. |
-| InputClaim | inputClaim2 | boolean | The second ClaimType to evaluate. |
-| OutputClaim | outputClaim | boolean | The ClaimTypes that will be produced after this ClaimsTransformation has been invoked (true or false). |
+| InputClaim | inputClaim1 | boolean | The first claim to evaluate. |
+| InputClaim | inputClaim2 | boolean | The second claim to evaluate. |
+| OutputClaim | outputClaim | boolean | The claim that will be produced after this claims transformation has been invoked (true or false). |
+
+### Example of OrClaims
-The following claims transformation demonstrates how to `Or` two boolean ClaimTypes. In the orchestration step, you can use a precondition to preset a self-asserted page, if the value of one of the claims is `true`.
+The following claims transformation demonstrates how to `Or` two boolean claims.
```xml <ClaimsTransformation Id="CheckWhetherEmailBePresented" TransformationMethod="OrClaims">
The following claims transformation demonstrates how to `Or` two boolean ClaimTy
</ClaimsTransformation> ```
-### Example of OrClaims
- - Input claims:
- - **inputClaim1**: true
- - **inputClaim2**: false
+ - **inputClaim1**: true
+ - **inputClaim2**: false
- Output claims:
- - **outputClaim**: true
+ - **outputClaim**: true
+
+## Next steps
+
+- Find more [claims transformation samples](https://github.com/azure-ad-b2c/unit-tests/tree/main/claims-transformation) on the Azure AD B2C community GitHub repo
active-directory-b2c Claims Transformation Technical Profile https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/active-directory-b2c/claims-transformation-technical-profile.md
Title: Define a Claims transformation technical profile
+ Title: Define a claims transformation technical profile
-description: Define a Claims transformation technical profile in a custom policy in Azure Active Directory B2C.
+description: Define a claims transformation technical profile in a custom policy in Azure Active Directory B2C.
Previously updated : 02/13/2020 Last updated : 01/17/2022
The following example shows a claims transformation technical profile:
## Output claims
-The **OutputClaims** element is mandatory. You should provide at least one output claim returned by the technical profile. The following example shows how to set default values in the output claims:
+The **OutputClaims** element is mandatory. Provide at least one output claim returned by the technical profile. The following example shows how to set default values in the output claims:
```xml <OutputClaims>
TransformationClaimType="collection" />
</TechnicalProfile> ```
-The claims transformation technical profile enables you to execute a claims transformation from any user journey's orchestration step. In the following example, the orchestration step calls one of the unlink technical profiles, such as **UnLink-Facebook-OAUTH**. This technical profile calls the claims transformation technical profile **RemoveAlternativeSecurityIdByIdentityProvider**, which generates a new **AlternativeSecurityIds2** claim that contains the list of user social identities, while removing the Facebook identity from the collections.
+The claims transformation technical profile enables you to execute a claims transformation from any user journey's orchestration step. In the following example, the orchestration step calls one of the unlink technical profiles, such as **UnLink-Facebook-OAUTH**. This technical profile calls the output claims transformation **RemoveAlternativeSecurityIdByIdentityProvider**, which generates a new **AlternativeSecurityIds2** claim. The output claim contains the list of user's social identities, while removing the Facebook identity from the collections.
```xml <UserJourney Id="AccountUnLink">
The claims transformation technical profile enables you to execute a claims tran
| Attribute | Required | Description | | | -- | -- |
-| IncludeClaimResolvingInClaimsHandling  | No | For input and output claims, specifies whether [claims resolution](claim-resolver-overview.md) is included in the technical profile. Possible values: `true`, or `false` (default). If you want to use a claims resolver in the technical profile, set this to `true`. |
+| IncludeClaimResolvingInClaimsHandling | No | For input and output claims, specifies whether [claims resolution](claim-resolver-overview.md) is included in the technical profile. Possible values: `true`, or `false` (default). If you want to use a claims resolver in the technical profile, set this metadata to `true`. |
+| ContentDefinitionReferenceId | No | The identifier of the [content definition](contentdefinitions.md) associated with this technical profile. The content definition metadata is required for [FormatLocalizedString](string-transformations.md#formatlocalizedstring), [GetLocalizedStringsTransformation](string-transformations.md#getlocalizedstringstransformation), and [GetMappedValueFromLocalizedCollection](string-transformations.md#getmappedvaluefromlocalizedcollection) claims transformations.|
## Use a validation technical profile
active-directory-b2c Date Transformations https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/active-directory-b2c/date-transformations.md
Previously updated : 1/14/2022 Last updated : 1/17/2022
# Date claims transformations
-This article provides examples for using the date claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [ClaimsTransformations](claimstransformations.md).
+This article provides examples for using the date claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [claims transformations](claimstransformations.md).
## AssertDateTimeIsGreaterThan Asserts that one date is later than a second date. Determines whether the `rightOperand` is greater than the `leftOperand`. If yes, throws an exception.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | leftOperand | string | First claim's type, which should be later than the second claim. | | InputClaim | rightOperand | string | Second claim's type, which should be earlier than the first claim. |
The **AssertDateTimeIsGreaterThan** claims transformation is always executed fro
![AssertStringClaimsAreEqual execution](./media/date-transformations/assert-execution.png)
-### AssertDateTimeIsGreaterThan example
+### Example of AssertDateTimeIsGreaterThan
The following example compares the `currentDateTime` claim with the `approvedDateTime` claim. An error is thrown if `currentDateTime` is later than `approvedDateTime`. The transformation treats values as equal if they are within 5 minutes (30000 milliseconds) difference. It won't throw an error if the values are equal because `AssertIfEqualTo` is set to `false`.
The following example compares the `currentDateTime` claim with the `approvedDat
> - Input claims:
- - **leftOperand**: 2022-01-01T15:00:00
- - **rightOperand**: 2022-01-22T15:00:00
+ - **leftOperand**: 2022-01-01T15:00:00
+ - **rightOperand**: 2022-01-22T15:00:00
- Input parameters:
- - **AssertIfEqualTo**: false
- - **AssertIfRightOperandIsNotPresent**: true
- - **TreatAsEqualIfWithinMillseconds**: 300000 (30 seconds)
+ - **AssertIfEqualTo**: false
+ - **AssertIfRightOperandIsNotPresent**: true
+ - **TreatAsEqualIfWithinMillseconds**: 300000 (30 seconds)
- Result: Error thrown ### Call the claims transformation
The self-asserted technical profile calls the validation `Example-AssertDates` t
</TechnicalProfile> ```
-## ConvertDateToDateTimeClaim
-
-Converts a `Date` claim type to a `DateTime` claim type. The claims transformation converts the time format and adds 12:00:00 AM to the date.
-
-| Item | TransformationClaimType | Data Type | Notes |
-| - | -- | | -- |
-| InputClaim | inputClaim | date | The claim type to be converted. |
-| OutputClaim | outputClaim | dateTime | The claim type that is produced after this claims transformation has been invoked. |
-
-### ConvertDateToDateTimeClaim example
-
-The following example demonstrates the conversion of the claim `dateOfBirth` (date data type) to another claim `dateOfBirthWithTime` (dateTime data type).
-
-```xml
- <ClaimsTransformation Id="ConvertToDateTime" TransformationMethod="ConvertDateToDateTimeClaim">
- <InputClaims>
- <InputClaim ClaimTypeReferenceId="dateOfBirth" TransformationClaimType="inputClaim" />
- </InputClaims>
- <OutputClaims>
- <OutputClaim ClaimTypeReferenceId="dateOfBirthWithTime" TransformationClaimType="outputClaim" />
- </OutputClaims>
- </ClaimsTransformation>
-```
--- Input claims:
- - **inputClaim**: 2022-01-03
-- Output claims:
- - **outputClaim**: 2022-01-03T00:00:00.0000000Z
- ## ConvertDateTimeToDateClaim Converts a `DateTime` claim type to a `Date` claim type. The claims transformation removes the time format from the date.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim | dateTime | The claim type to be converted. | | OutputClaim | outputClaim | date | The claim type that is produced after this claims transformation has been invoked. |
-### ConvertDateTimeToDateClaim example
+### Example of ConvertDateTimeToDateClaim
The following example demonstrates the conversion of the claim `systemDateTime` (dateTime data type) to another claim `systemDate` (date data type).
The following example demonstrates the conversion of the claim `systemDateTime`
- Output claims: - **outputClaim**: 2022-01-03
+## ConvertDateToDateTimeClaim
+
+Converts a `Date` claim type to a `DateTime` claim type. The claims transformation converts the time format and adds 12:00:00 AM to the date.
+
+| Element | TransformationClaimType | Data Type | Notes |
+| - | -- | | -- |
+| InputClaim | inputClaim | date | The claim type to be converted. |
+| OutputClaim | outputClaim | dateTime | The claim type that is produced after this claims transformation has been invoked. |
+
+### Example of ConvertDateToDateTimeClaim
+
+The following example demonstrates the conversion of the claim `dateOfBirth` (date data type) to another claim `dateOfBirthWithTime` (dateTime data type).
+
+```xml
+ <ClaimsTransformation Id="ConvertToDateTime" TransformationMethod="ConvertDateToDateTimeClaim">
+ <InputClaims>
+ <InputClaim ClaimTypeReferenceId="dateOfBirth" TransformationClaimType="inputClaim" />
+ </InputClaims>
+ <OutputClaims>
+ <OutputClaim ClaimTypeReferenceId="dateOfBirthWithTime" TransformationClaimType="outputClaim" />
+ </OutputClaims>
+ </ClaimsTransformation>
+```
+
+- Input claims:
+ - **inputClaim**: 2022-01-03
+- Output claims:
+ - **outputClaim**: 2022-01-03T00:00:00.0000000Z
+ ## DateTimeComparison Compares two dates and determines whether the first date is later, earlier, or equal to another. The result is a new Boolean claim with a value of `true` or `false`.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | firstDateTime | dateTime | The first date to compare whether it's later, earlier, or equal to the second date. Null value throws an exception. |
-| InputClaim | secondDateTime | dateTime | The second date to compare. Null value is treated as the current datetTime. |
+| InputClaim | secondDateTime | dateTime | The second date to compare. Null value is treated as the current date and time. |
| InputParameter | timeSpanInSeconds | int | Timespan to add to the first date. Possible values: range from negative -2,147,483,648 through positive 2,147,483,647. |
-| InputParameter | operator | string | One of following values: same, later than, or earlier than. |
+| InputParameter | operator | string | One of following values: `same`, `later than`, or `earlier than`. |
| OutputClaim | result | boolean | The claim that is produced after this claims transformation has been invoked. |
-Use this claims transformation to determine if first date plus the timespan parameter is later, earlier, or equal to another. For example, you may store the last time a user accepted your terms of services (TOS). After three months, you can ask the user to access the TOS again.
-To run the claim transformation, you first need to get the current date and also the last time user accepts the TOS.
-
-### DateTimeComparison example
+### Example of DateTimeComparison
-The following example shows that the first date (2022-01-01T00:00:00) plus 90 days is later than the second date (2022-03-16T00:00:00).
+Use this claims transformation to determine if first date plus the `timeSpanInSeconds` parameter is later, earlier, or equal to another. The following example shows that the first date (2022-01-01T00:00:00) plus 90 days is later than the second date (2022-03-16T00:00:00).
```xml <ClaimsTransformation Id="CompareLastTOSAcceptedWithCurrentDateTime" TransformationMethod="DateTimeComparison">
The following example shows that the first date (2022-01-01T00:00:00) plus 90 da
``` - Input claims:
- - **firstDateTime**: 2022-01-01T00:00:00.100000Z
- - **secondDateTime**: 2022-03-16T00:00:00.100000Z
+ - **firstDateTime**: 2022-01-01T00:00:00.100000Z
+ - **secondDateTime**: 2022-03-16T00:00:00.100000Z
- Input parameters:
- - **operator**: later than
- - **timeSpanInSeconds**: 7776000 (90 days)
+ - **operator**: later than
+ - **timeSpanInSeconds**: 7776000 (90 days)
- Output claims:
- - **result**: true
+ - **result**: true
## GetCurrentDateTime Get the current UTC date and time and add the value to a claim type.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | OutputClaim | currentDateTime | dateTime | The claim type that is produced after this claims transformation has been invoked. |
-### GetCurrentDateTime example
+### Example of GetCurrentDateTime
The following example shows how to get the current data and time:
The following example shows how to get the current data and time:
</ClaimsTransformation> ```
-* Output claims:
- * **currentDateTime**: 2022-01-14T11:40:35.0000000Z
+- Output claims:
+ - **currentDateTime**: 2022-01-14T11:40:35.0000000Z
## Next steps
active-directory-b2c General Transformations https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/active-directory-b2c/general-transformations.md
Previously updated : 01/14/2022 Last updated : 01/17/2022 # General claims transformations -
-This article provides examples for using general claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [claims transformations](claimstransformations.md).
+This article provides examples for using general claims transformations of the Azure Active Directory B2C (Azure AD B2C) custom policy. For more information, see [claims transformations](claimstransformations.md).
## CopyClaim Copy value of a claim to another. Both claims must be from the same type.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim | string, int | The claim type, which is to be copied. | | OutputClaim | outputClaim | string, int | The claim that is produced after this claims transformation has been invoked. |
Use this claims transformation to copy a value from a string or numeric claim, t
</ClaimsTransformation> ```
-### CopyClaim example
+### Example of CopyClaim
- Input claims:
- - **inputClaim**: bob@contoso.com
+ - **inputClaim**: bob@contoso.com
- Output claims:
- - **outputClaim**: bob@contoso.com
+ - **outputClaim**: bob@contoso.com
## DoesClaimExist
-Checks if the **inputClaim** exists or not and sets **outputClaim** to true or false accordingly.
+Checks if the input claim exists, and sets output claim to `true` or `false` accordingly.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim |Any | The input claim whose existence needs to be verified. | | OutputClaim | outputClaim | boolean | The claim that is produced after this claims transformation has been invoked. |
+### Example of DoesClaimExist
+ Use this claims transformation to check if a claim exists or contains any value. The return value is a boolean that indicates whether the claim exists. Following example checks if the email address exists. ```xml
Use this claims transformation to check if a claim exists or contains any value.
</ClaimsTransformation> ```
-### DoesClaimExist example
- - Input claims: - **inputClaim**: someone@contoso.com - Output claims:
Use this claims transformation to check if a claim exists or contains any value.
Hash the provided plain text using the salt and a secret. The hashing algorithm used is SHA-256.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | plaintext | string | The input claim to be encrypted | | InputClaim | salt | string | The salt parameter. You can create a random value, using `CreateRandomString` claims transformation. | | InputParameter | randomizerSecret | string | Points to an existing Azure AD B2C **policy key**. To create a new policy key: In your Azure AD B2C tenant, under **Manage**, select **Identity Experience Framework**. Select **Policy keys** to view the keys that are available in your tenant. Select **Add**. For **Options**, select **Manual**. Provide a name (the prefix *B2C_1A_* might be added automatically.). In the **Secret** text box, enter any secret you want to use, such as 1234567890. For **Key usage**, select **Signature**. Select **Create**. | | OutputClaim | hash | string | The claim that is produced after this claims transformation has been invoked. The claim configured in the `plaintext` inputClaim. |
+### Example of Hash
+
+The following example demonstrates how to hash an email address. The claims transformation adds the salt to the email address before hashing the value. To call this claims transformation, set a value to the `mySalt` claim.
+ ```xml <ClaimsTransformation Id="HashPasswordWithEmail" TransformationMethod="Hash"> <InputClaims>
- <InputClaim ClaimTypeReferenceId="password" TransformationClaimType="plaintext" />
- <InputClaim ClaimTypeReferenceId="email" TransformationClaimType="salt" />
+ <InputClaim ClaimTypeReferenceId="email" TransformationClaimType="plaintext" />
+ <InputClaim ClaimTypeReferenceId="mySalt" TransformationClaimType="salt" />
</InputClaims> <InputParameters> <InputParameter Id="randomizerSecret" DataType="string" Value="B2C_1A_AccountTransformSecret" /> </InputParameters> <OutputClaims>
- <OutputClaim ClaimTypeReferenceId="hashedPassword" TransformationClaimType="hash" />
+ <OutputClaim ClaimTypeReferenceId="hashedEmail" TransformationClaimType="hash" />
</OutputClaims> </ClaimsTransformation> ```
-### Hash example
- - Input claims:
- - **plaintext**: MyPass@word1
+ - **plaintext**: someone@contoso.com
- **salt**: 487624568 - **randomizerSecret**: B2C_1A_AccountTransformSecret - Output claims:
active-directory-b2c Integer Transformations https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/active-directory-b2c/integer-transformations.md
Previously updated : 08/10/2021 Last updated : 01/17/2022 # Integer claims transformations - This article provides examples for using the integer claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [ClaimsTransformations](claimstransformations.md). ## AdjustNumber Increases or decreases a numeric claim and return a new claim.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim | int | The claim type, which contains the number to increase or decrease. If the `inputClaim` claim value is null, the default of 0 is used. | | InputParameter | Operator | string | Possible values: `INCREMENT` (default), or `DECREMENT`.| | OutputClaim | outputClaim | int | The claim type that is produced after this claims transformation has been invoked. |
-Use this claim transformation to increase or decrease a numeric claim value.
+### Example of AdjustNumber
+
+Use this claim transformation to increase or decrease a numeric claim value. The following claim transformation increases a numeric claim value.
```xml <ClaimsTransformation Id="UpdateSteps" TransformationMethod="AdjustNumber">
Use this claim transformation to increase or decrease a numeric claim value.
</ClaimsTransformation> ```
-### Example 1
- - Input claims:
- - **inputClaim**: 1
+ - **inputClaim**: 1
- Input parameters:
- - **Operator**: INCREMENT
+ - **Operator**: INCREMENT
- Output claims:
- - **outputClaim**: 2
+ - **outputClaim**: 2
+
+### Example of AdjustNumber with null value
-### Example 2
+If the input claim is null, the output claim will be one.
- Input claims:
- - **inputClaim**: NULL
+ - **inputClaim**: NULL
- Input parameters:
- - **Operator**: INCREMENT
+ - **Operator**: INCREMENT
- Output claims:
- - **outputClaim**: 1
-
+ - **outputClaim**: 1
## AssertNumber Determines whether a numeric claim is greater, lesser, equal, or not equal to a number.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim | int | The first numeric claim to compare whether it is greater, lesser, equal, or not equal than the second number. Null value throws an exception. | | InputParameter | CompareToValue | int | The second number to compare whether it is greater, lesser, equal, or not equal than the first number. |
The **AssertNumberError** self-asserted technical profile metadata controls the
For more information how to call the claims transformation in an assertion mode, see [AssertStringClaimsAreEqual](string-transformations.md#assertstringclaimsareequal), [AssertBooleanClaimIsEqualToValue](boolean-transformations.md#assertbooleanclaimisequaltovalue), and [AssertDateTimeIsGreaterThan](date-transformations.md#assertdatetimeisgreaterthan) claims transformations.
-### Assertion mode example
+### Example of AssertNumber
-The following example asserts the number of attempts is over five. The claims transformation throws an error according to the comparison result.
+The following example asserts the number of attempts is over five. The claims transformation throws an error according to the comparison result.
```xml <ClaimsTransformation Id="isOverLimit" TransformationMethod="AssertNumber">
The following example asserts the number of attempts is over five. The claims t
``` - Input claims:
- - **inputClaim**: 10
+ - **inputClaim**: 10
- Input parameters:
- - **Operator**: GREATERTHAN
- - **CompareToValue**: 5
- - **throwError**: true
+ - **Operator**: GREATERTHAN
+ - **CompareToValue**: 5
+ - **throwError**: true
- Result: Error thrown
-### Evaluation mode example
+### Example of AssertNumber evaluation mode
The following example evaluates whether the number of attempts is over five. The output claim contains a boolean value according to the comparison result. The claims transformation will not throw an error.
The following example evaluates whether the number of attempts is over five. The
``` - Input claims:
- - **inputClaim**: 10
+ - **inputClaim**: 10
- Input parameters:
- - **Operator**: GREATERTHAN
- - **CompareToValue**: 5
- - **throwError**: false
+ - **Operator**: GREATERTHAN
+ - **CompareToValue**: 5
+ - **throwError**: false
- Output claims:
- - **outputClaim**: true
+ - **outputClaim**: true
## ConvertNumberToStringClaim Converts a long data type into a string data type.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim | long | The claim type to convert to a string. | | OutputClaim | outputClaim | string | The claim type that is produced after this claims transformation has been invoked. |
+### Example of ConvertNumberToStringClaim
+ In this example, the `numericUserId` claim with a value type of long is converted to a `UserId` claim with a value type of string. ```xml
In this example, the `numericUserId` claim with a value type of long is converte
</ClaimsTransformation> ```
-### Example
- - Input claims:
- - **inputClaim**: 12334 (long)
+ - **inputClaim**: 12334 (long)
- Output claims:
- - **outputClaim**: "12334" (string)
+ - **outputClaim**: "12334" (string)
+
+## Next steps
+- Find more [claims transformation samples](https://github.com/azure-ad-b2c/unit-tests/tree/main/claims-transformation) on the Azure AD B2C community GitHub repo
active-directory-b2c Json Transformations https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/active-directory-b2c/json-transformations.md
Previously updated : 06/27/2021 Last updated : 01/17/2022 # JSON claims transformations
+This article provides examples for using the JSON claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [claims transformations](claimstransformations.md).
-This article provides examples for using the JSON claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [ClaimsTransformations](claimstransformations.md).
+## CreateJsonArray
+
+Create a JSON single element array from a claim value.
+
+| Element | TransformationClaimType | Data Type | Notes |
+| - | -- | | -- |
+| InputClaim | inputClaim | string | The claim to be added to the output claim. |
+| OutputClaim | outputClaim | string | The JSON string that is produced after this claims transformation has been invoked. |
+
+### Example of CreateJsonArray
+
+The following example creates a JSON single array.
+
+```xml
+<ClaimsTransformation Id="createlJsonPayload" TransformationMethod="CreateJsonArray">
+ <InputClaims>
+ <InputClaim ClaimTypeReferenceId="email" TransformationClaimType="inputClaim" />
+ </InputClaims>
+ <OutputClaims>
+ <OutputClaim ClaimTypeReferenceId="result" TransformationClaimType="outputClaim" />
+ </OutputClaims>
+</ClaimsTransformation>
+```
+
+- Input claims:
+ - **inputClaim**: someone@example.com
+- Output claims:
+ - **outputClaim**: ["someone@contoso.com"]
## GenerateJson Use either claim values or constants to generate a JSON string. The path string following dot notation is used to indicate where to insert the data into a JSON string. After splitting by dots, any integers are interpreted as the index of a JSON array and non-integers are interpreted as the index of a JSON object.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | Any string following dot notation | string | The JsonPath of the JSON where the claim value will be inserted into. | | InputParameter | Any string following dot notation | string | The JsonPath of the JSON where the constant string value will be inserted into. | | OutputClaim | outputClaim | string | The generated JSON string. |
-### Example 1
+### Example of GenerateJson
-The following example generates a JSON string based on the claim value of "email" and "otp" as well as constant strings.
+The following example generates a JSON string based on the claim value of "email" and "OTP" and constant strings.
```xml <ClaimsTransformation Id="GenerateRequestBody" TransformationMethod="GenerateJson">
The following example generates a JSON string based on the claim value of "email
The following claims transformation outputs a JSON string claim that will be the body of the request sent to SendGrid (a third-party email provider). The JSON object's structure is defined by the IDs in dot notation of the InputParameters and the TransformationClaimTypes of the InputClaims. Numbers in the dot notation imply arrays. The values come from the InputClaims' values and the InputParameters' "Value" properties. -- Input claims :
+- Input claims:
- **email**, transformation claim type **personalizations.0.to.0.email**: "someone@example.com" - **otp**, transformation claim type **personalizations.0.dynamic_template_data.otp** "346349" - Input parameter:
The following claims transformation outputs a JSON string claim that will be the
- **from.email**: "service@contoso.com" - **personalizations.0.subject** "Contoso account email verification code" - Output claim:
- - **requestBody**: JSON value
-
-```json
-{
- "personalizations": [
- {
- "to": [
- {
- "email": "someone@example.com"
+ - **outputClaim**:
+
+ ```json
+ {
+ "personalizations": [
+ {
+ "to": [
+ {
+ "email": "someone@example.com"
+ }
+ ],
+ "dynamic_template_data": {
+ "otp": "346349",
+ "verify-email" : "someone@example.com"
+ },
+ "subject": "Contoso account email verification code"
+ }
+ ],
+ "template_id": "d-989077fbba9746e89f3f6411f596fb96",
+ "from": {
+ "email": "service@contoso.com"
}
- ],
- "dynamic_template_data": {
- "otp": "346349",
- "verify-email" : "someone@example.com"
- },
- "subject": "Contoso account email verification code"
- }
- ],
- "template_id": "d-989077fbba9746e89f3f6411f596fb96",
- "from": {
- "email": "service@contoso.com"
- }
-}
-```
+ }
+ ```
-### Example 2
+### Another example of GenerateJson
-The following example generates a JSON string based on the claim values as well as constant strings.
+The following example generates a JSON string based on the claim values and constant strings.
```xml <ClaimsTransformation Id="GenerateRequestBody" TransformationMethod="GenerateJson">
The following example generates a JSON string based on the claim values as well
The following claims transformation outputs a JSON string claim that will be the body of the request sent to a REST API. The JSON object's structure is defined by the IDs in dot notation of the InputParameters and the TransformationClaimTypes of the InputClaims. The values come from the InputClaims' values and the InputParameters' "Value" properties. -- Input claims :
+- Input claims:
- **email**, transformation claim type **customerEntity.email**: "john.s@contoso.com" - **objectId**, transformation claim type **customerEntity.userObjectId** "01234567-89ab-cdef-0123-456789abcdef" - **givenName**, transformation claim type **customerEntity.firstName** "John"
The following claims transformation outputs a JSON string claim that will be the
- **customerEntity.role.name**: "Administrator" - **customerEntity.role.id** 1 - Output claim:
- - **requestBody**: JSON value
+ - **requestBody**:
-```json
-{
- "customerEntity":{
- "email":"john.s@contoso.com",
- "userObjectId":"01234567-89ab-cdef-0123-456789abcdef",
- "firstName":"John",
- "lastName":"Smith",
- "role":{
- "name":"Administrator",
- "id": 1
- }
- }
-}
-```
+ ```json
+ {
+ "customerEntity":{
+ "email":"john.s@contoso.com",
+ "userObjectId":"01234567-89ab-cdef-0123-456789abcdef",
+ "firstName":"John",
+ "lastName":"Smith",
+ "role":{
+ "name":"Administrator",
+ "id": 1
+ }
+ }
+ }
+ ```
## GetClaimFromJson Get a specified element from a JSON data.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | inputJson | string | The ClaimTypes that are used by the claims transformation to get the item. |
+| InputClaim | inputJson | string | The claims that are used by the claims transformation to get the item. |
| InputParameter | claimToExtract | string | the name of the JSON element to be extracted. |
-| OutputClaim | extractedClaim | string | The ClaimType that is produced after this claims transformation has been invoked, the element value specified in the _claimToExtract_ input parameter. |
+| OutputClaim | extractedClaim | string | The claim that is produced after this claims transformation has been invoked, the element value specified in the _claimToExtract_ input parameter. |
+
+### Example of GetClaimFromJson
In the following example, the claims transformation extracted the `emailAddress` element from the JSON data: `{"emailAddress": "someone@example.com", "displayName": "Someone"}`
In the following example, the claims transformation extracted the `emailAddress`
</ClaimsTransformation> ```
-### Example
- - Input claims: - **inputJson**: {"emailAddress": "someone@example.com", "displayName": "Someone"} - Input parameter:
- - **claimToExtract**: emailAddress
+ - **claimToExtract**: emailAddress
- Output claims: - **extractedClaim**: someone@example.com
+### Another example of GetClaimFromJson
+ The GetClaimFromJson claims transformation gets a single element from a JSON data. In the preceding example, the emailAddress. To get the displayName, create another claims transformation. For example: ```xml
The GetClaimFromJson claims transformation gets a single element from a JSON dat
- Input claims: - **inputJson**: {"emailAddress": "someone@example.com", "displayName": "Someone"} - Input parameter:
- - **claimToExtract**: displayName
+ - **claimToExtract**: displayName
- Output claims: - **extractedClaim**: Someone
The GetClaimFromJson claims transformation gets a single element from a JSON dat
Get a list of specified elements from Json data.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | jsonSourceClaim | string | The ClaimTypes that are used by the claims transformation to get the claims. |
+| InputClaim | jsonSourceClaim | string | The claim with the JSON payload. This claim is used by the claims transformation to get the claims. |
| InputParameter | errorOnMissingClaims | boolean | Specifies whether to throw an error if one of the claims is missing. | | InputParameter | includeEmptyClaims | string | Specify whether to include empty claims. | | InputParameter | jsonSourceKeyName | string | Element key name | | InputParameter | jsonSourceValueName | string | Element value name | | OutputClaim | Collection | string, int, boolean, and datetime |List of claims to extract. The name of the claim should be equal to the one specified in _jsonSourceClaim_ input claim. |
-In the following example, the claims transformation extracts the following claims: email (string), displayName (string), membershipNum (int), active (boolean) and birthdate (datetime) from the JSON data.
+### Example of GetClaimsFromJsonArray
-```json
-[{"key":"email","value":"someone@example.com"}, {"key":"displayName","value":"Someone"}, {"key":"membershipNum","value":6353399}, {"key":"active","value":true}, {"key":"birthdate","value":"1980-09-23T00:00:00Z"}]
-```
+In the following example, the claims transformation extracts the following claims: email (string), displayName (string), membershipNum (int), active (boolean) and birthDate (datetime) from the JSON data.
```xml <ClaimsTransformation Id="GetClaimsFromJson" TransformationMethod="GetClaimsFromJsonArray">
In the following example, the claims transformation extracts the following claim
<OutputClaims> <OutputClaim ClaimTypeReferenceId="email" /> <OutputClaim ClaimTypeReferenceId="displayName" />
- <OutputClaim ClaimTypeReferenceId="membershipNum" />
+ <OutputClaim ClaimTypeReferenceId="membershipID" />
<OutputClaim ClaimTypeReferenceId="active" />
- <OutputClaim ClaimTypeReferenceId="birthdate" />
+ <OutputClaim ClaimTypeReferenceId="birthDate" />
</OutputClaims> </ClaimsTransformation> ``` - Input claims:
- - **jsonSourceClaim**: [{"key":"email","value":"someone@example.com"}, {"key":"displayName","value":"Someone"}, {"key":"membershipNum","value":6353399}, {"key":"active","value": true}, {"key":"birthdate","value":"1980-09-23T00:00:00Z"}]
+ - **jsonSourceClaim**:
+
+ ```json
+ [
+ {
+ "key": "email",
+ "value": "someone@example.com"
+ },
+ {
+ "key": "displayName",
+ "value": "Someone"
+ },
+ {
+ "key": "membershipID",
+ "value": 6353399
+ },
+ {
+ "key": "active",
+ "value": true
+ },
+ {
+ "key": "birthDate",
+ "value": "2005-09-23T00:00:00Z"
+ }
+ ]
+ ```
+ - Input parameters:
- - **errorOnMissingClaims**: false
- - **includeEmptyClaims**: false
- - **jsonSourceKeyName**: key
- - **jsonSourceValueName**: value
+ - **errorOnMissingClaims**: false
+ - **includeEmptyClaims**: false
+ - **jsonSourceKeyName**: key
+ - **jsonSourceValueName**: value
- Output claims: - **email**: "someone@example.com" - **displayName**: "Someone"
- - **membershipNum**: 6353399
+ - **membershipID**: 6353399
- **active**: true
- - **birthdate**: 1980-09-23T00:00:00Z
+ - **birthDate**: 2005-09-23T00:00:00Z
## GetNumericClaimFromJson Gets a specified numeric (long) element from a JSON data.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | inputJson | string | The ClaimTypes that are used by the claims transformation to get the claim. |
+| InputClaim | inputJson | string | The claim with the JSON payload. This claim is used by the claims transformation to get the numeric claim. |
| InputParameter | claimToExtract | string | The name of the JSON element to extract. |
-| OutputClaim | extractedClaim | long | The ClaimType that is produced after this ClaimsTransformation has been invoked, the element's value specified in the _claimToExtract_ input parameters. |
+| OutputClaim | extractedClaim | long | The claim that is produced after this claims transformation has been invoked, the element's value specified in the _claimToExtract_ input parameters. |
-In the following example, the claims transformation extracts the `id` element from the JSON data.
+### Example of GetNumericClaimFromJson
-```json
-{
- "emailAddress": "someone@example.com",
- "displayName": "Someone",
- "id" : 6353399
-}
-```
+In the following example, the claims transformation extracts the `id` element from the JSON data.
```xml <ClaimsTransformation Id="GetIdFromResponse" TransformationMethod="GetNumericClaimFromJson">
In the following example, the claims transformation extracts the `id` element fr
</ClaimsTransformation> ```
-### Example
- - Input claims:
- - **inputJson**: {"emailAddress": "someone@example.com", "displayName": "Someone", "id" : 6353399}
+ - **inputJson**:
+
+ ```json
+ {
+ "emailAddress": "someone@example.com",
+ "displayName": "Someone",
+ "id": 6353399
+ }
+ ```
+ - Input parameters
- - **claimToExtract**: id
+ - **claimToExtract**: id
- Output claims:
- - **extractedClaim**: 6353399
+ - **extractedClaim**: 6353399
## GetSingleItemFromJson Gets the first element from a JSON data.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | inputJson | string | The ClaimTypes that are used by the claims transformation to get the item from the JSON data. |
+| InputClaim | inputJson | string | The claim with the JSON payload. This claim is used by the claims transformation to get the item from the JSON data. |
| OutputClaim | key | string | The first element key in the JSON. | | OutputClaim | value | string | The first element value in the JSON. |
+### Example of GetSingleItemFromJson
+ In the following example, the claims transformation extracts the first element (given name) from the JSON data. ```xml
In the following example, the claims transformation extracts the first element (
</ClaimsTransformation> ```
-### Example
- - Input claims:
- - **inputJson**: {"givenName": "Emilty", "lastName": "Smith"}
+ - **inputJson**:
+
+ ```json
+ {
+ "givenName": "Emily",
+ "lastName": "Smith"
+ }
+ ```
+ - Output claims: - **key**: givenName - **value**: Emilty
In the following example, the claims transformation extracts the first element (
Gets the first element from a JSON data array.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | inputJsonClaim | string | The ClaimTypes that are used by the claims transformation to get the item from the JSON array. |
-| OutputClaim | extractedClaim | string | The ClaimType that is produced after this ClaimsTransformation has been invoked, the first element in the JSON array. |
+| InputClaim | inputJsonClaim | string | The claim with the JSON payload. This claim is used by the claims transformation to get the value from the JSON array. |
+| OutputClaim | extractedClaim | string | The claim that is produced after this claims transformation has been invoked, the first element in the JSON array. |
+
+### Example of GetSingleValueFromJsonArray
In the following example, the claims transformation extracts the first element (email address) from the JSON array `["someone@example.com", "Someone", 6353399]`.
In the following example, the claims transformation extracts the first element (
</ClaimsTransformation> ```
-### Example
- - Input claims: - **inputJsonClaim**: ["someone@example.com", "Someone", 6353399] - Output claims:
In the following example, the claims transformation extracts the first element (
## XmlStringToJsonString
-Converts XML data to JSON format.
+Convert XML data to JSON format.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | xml | string | The ClaimTypes that are used by the claims transformation to convert the data from XML to JSON format. |
-| OutputClaim | json | string | The ClaimType that is produced after this ClaimsTransformation has been invoked, the data in JSON format. |
+| InputClaim | xml | string | The claim with the XML payload. This claim is used by the claims transformation to convert the data from XML to JSON format. |
+| OutputClaim | json | string | The claim that is produced after this claims transformation has been invoked, the data in JSON format. |
```xml <ClaimsTransformation Id="ConvertXmlToJson" TransformationMethod="XmlStringToJsonString">
Converts XML data to JSON format.
</ClaimsTransformation> ```
+### Example of XmlStringToJsonString
+ In the following example, the claims transformation converts the following XML data to JSON format.
-#### Example
+ Input claim: ```xml
Output claim:
} ```
+## Next steps
+- Find more [claims transformation samples](https://github.com/azure-ad-b2c/unit-tests/tree/main/claims-transformation) on the Azure AD B2C community GitHub repo
active-directory-b2c Phone Number Claims Transformations https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/active-directory-b2c/phone-number-claims-transformations.md
Previously updated : 02/26/2020 Last updated : 01/17/2022 # Define phone number claims transformations in Azure AD B2C -
-This article provides reference and examples for using the phone number claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information about claims transformations in general, see [ClaimsTransformations](claimstransformations.md).
+This article provides reference and examples for using the phone number claims transformations in Azure Active Directory B2C (Azure AD B2C) custom policy. For more information about claims transformations in general, see [ClaimsTransformations](claimstransformations.md).
[!INCLUDE [b2c-public-preview-feature](../../includes/active-directory-b2c-public-preview.md)]
This article provides reference and examples for using the phone number claims t
Converts a `phoneNumber` data type into a `string` data type.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | phoneNumber | phoneNumber | The ClaimType to convert to a string. |
-| OutputClaim | phoneNumberString | string | The ClaimType that is produced after this claims transformation has been invoked. |
+| InputClaim | phoneNumber | phoneNumber | The claim to convert to a string. |
+| OutputClaim | phoneNumberString | string | The claim that is produced after this claims transformation has been invoked. |
+
+### Example of ConvertPhoneNumberClaimToString
In this example, the cellPhoneNumber claim with a value type of `phoneNumber` is converted to a cellPhone claim with a value type of `string`.
In this example, the cellPhoneNumber claim with a value type of `phoneNumber` is
</ClaimsTransformation> ```
-### Example
- - Input claims: - **phoneNumber**: +11234567890 (phoneNumber) - Output claims:
In this example, the cellPhoneNumber claim with a value type of `phoneNumber` is
## ConvertStringToPhoneNumberClaim
-This claim transformation validates the format of the phone number. If it is in a valid format, change it to a standard format used by Azure AD B2C. If the provided phone number is not in a valid format, an error message is returned.
+Validates the format of a phone number. If valid, change it to a standard format used by Azure AD B2C. If the provided phone number is not in a valid format, an error message is returned.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | phoneNumberString | string | The string claim for the phone number. The phone number has to be in international format, complete with a leading "+" and country/region code. If input claim `country` is provided, the phone number is in local format (without the country/region code). | | InputClaim | country | string | [Optional] The string claim for the country/region code of the phone number in ISO3166 format (the two-letter ISO-3166 country/region code). |
The **ConvertStringToPhoneNumberClaim** claims transformation is always executed
![Diagram of error message execution path](./media/phone-authentication/assert-execution.png)
-You can use this claims transformation to ensure that the provided string claim is a valid phone number. If not, an error message is thrown. The following example checks that the **phoneString** ClaimType is indeed a valid phone number, and then returns the phone number in the standard Azure AD B2C format. Otherwise, an error message is thrown.
+### Example of ConvertStringToPhoneNumberClaim
+
+The following example checks that the **phoneString** claim is indeed a valid phone number, and then returns the phone number in the standard Azure AD B2C format. Otherwise, an error message is thrown.
```xml <ClaimsTransformation Id="ConvertStringToPhoneNumber" TransformationMethod="ConvertStringToPhoneNumberClaim">
You can use this claims transformation to ensure that the provided string claim
</ClaimsTransformation> ```
-The self-asserted technical profile that calls the validation technical profile that contains this claims transformation can define the error message.
-
-```xml
-<TechnicalProfile Id="SelfAsserted-LocalAccountSignup-Phone">
- <Metadata>
- <Item Key="UserMessageIfClaimsTransformationInvalidPhoneNumber">Custom error message if the phone number is not valid.</Item>
- </Metadata>
- ...
-</TechnicalProfile>
-```
-
-### Example 1
- - Input claims: - **phoneNumberString**: 033 456-7890 - **country**: DK - Output claims: - **outputClaim**: +450334567890
-### Example 2
+### Example of ConvertStringToPhoneNumberClaim without country code claim
- Input claims: - **phoneNumberString**: +1 (123) 456-7890 - Output claims: - **outputClaim**: +11234567890
+### Calling the ConvertStringToPhoneNumberClaim claims transformation
+
+The self-asserted technical profile that calls the validation technical profile that contains this claims transformation can define the error message.
+
+```xml
+<TechnicalProfile Id="SelfAsserted-LocalAccountSignup-Phone">
+ <Metadata>
+ <Item Key="UserMessageIfClaimsTransformationInvalidPhoneNumber">Custom error message if the phone number is not valid.</Item>
+ </Metadata>
+ ...
+</TechnicalProfile>
+```
## GetNationalNumberAndCountryCodeFromPhoneNumberString
-This extracts the country/region code and the national number from the input claim, and optionally throws an exception if the supplied phone number is not valid.
+Extracts the country/region code and the national number from the input claim, and optionally throws an exception if the supplied phone number is not valid.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | phoneNumber | string | The string claim of the phone number. The phone number has to be in international format, complete with a leading "+" and country/region code. | | InputParameter | throwExceptionOnFailure | boolean | [Optional] A parameter indicating whether an exception is thrown when the phone number is not valid. Default value is false. |
If the **GetNationalNumberAndCountryCodeFromPhoneNumberString** claims transform
You can use this claims transformation to split a full phone number into the country/region code and the national number. If the phone number provided is not valid, you can choose to throw an error message.
+### Example of GetNationalNumberAndCountryCodeFromPhoneNumberString
+ The following example tries to split the phone number into national number and country/region code. If the phone number is valid, the phone number will be overridden by the national number. If the phone number is not valid, an exception will not be thrown and the phone number still has its original value. ```xml
The following example tries to split the phone number into national number and c
</ClaimsTransformation> ```
-The self-asserted technical profile that calls the validation technical profile that contains this claims transformation can define the error message.
-
-```xml
-<TechnicalProfile Id="SelfAsserted-LocalAccountSignup-Phone">
- <Metadata>
- <Item Key="UserMessageIfPhoneNumberParseFailure">Custom error message if the phone number is not valid.</Item>
- </Metadata>
- ...
-</TechnicalProfile>
-```
-
-### Example 1
- - Input claims: - **phoneNumber**: +49 (123) 456-7890 - Input parameters:
The self-asserted technical profile that calls the validation technical profile
- **nationalNumber**: 1234567890 - **countryCode**: DE
-### Example 2
+### Example of GetNationalNumberAndCountryCodeFromPhoneNumberString with CallingCode parameter
+
+The following example tries to split the phone number into national number and country calling code.
+
+```xml
+<ClaimsTransformation Id="GetNationalNumberAndCountryCodeFromPhoneNumberString" TransformationMethod="GetNationalNumberAndCountryCodeFromPhoneNumberString">
+ <InputClaims>
+ <InputClaim ClaimTypeReferenceId="phoneNumber" TransformationClaimType="phoneNumber" />
+ </InputClaims>
+ <InputParameters>
+ <InputParameter Id="throwExceptionOnFailure" DataType="boolean" Value="false" />
+ <InputParameter Id="countryCodeType" DataType="string" Value="CallingCode" />
+ </InputParameters>
+ <OutputClaims>
+ <OutputClaim ClaimTypeReferenceId="nationalNumber" TransformationClaimType="nationalNumber" />
+ <OutputClaim ClaimTypeReferenceId="countryCode" TransformationClaimType="countryCode" />
+ </OutputClaims>
+</ClaimsTransformation>
+```
- Input claims: - **phoneNumber**: +49 (123) 456-7890
The self-asserted technical profile that calls the validation technical profile
- Output claims: - **nationalNumber**: 1234567890 - **countryCode**: +49+
+### Calling the GetNationalNumberAndCountryCodeFromPhoneNumberString claims transformation
+
+The self-asserted technical profile that calls the validation technical profile that contains this claims transformation can define the error message.
+
+```xml
+<TechnicalProfile Id="SelfAsserted-LocalAccountSignup-Phone">
+ <Metadata>
+ <Item Key="UserMessageIfPhoneNumberParseFailure">Custom error message if the phone number is not valid.</Item>
+ </Metadata>
+ ...
+</TechnicalProfile>
+```
+
+## Next steps
+
+- Find more [claims transformation samples](https://github.com/azure-ad-b2c/unit-tests/tree/main/claims-transformation) on the Azure AD B2C community GitHub repo
active-directory-b2c Social Transformations https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/active-directory-b2c/social-transformations.md
Previously updated : 09/10/2018 Last updated : 01/17/2022 # Social accounts claims transformations - In Azure Active Directory B2C (Azure AD B2C), social account identities are stored in a `userIdentities` attribute of a **alternativeSecurityIdCollection** claim type. Each item in the **alternativeSecurityIdCollection** specifies the issuer (identity provider name, such as facebook.com) and the `issuerUserId`, which is a unique user identifier for the issuer. ```json
In Azure Active Directory B2C (Azure AD B2C), social account identities are stor
This article provides examples for using the social account claims transformations of the Identity Experience Framework schema in Azure AD B2C. For more information, see [ClaimsTransformations](claimstransformations.md).
-## CreateAlternativeSecurityId
+## AddItemToAlternativeSecurityIdCollection
-Creates a JSON representation of the userΓÇÖs alternativeSecurityId property that can be used in the calls to Azure Active Directory. For more information, see the [AlternativeSecurityId](/graph/api/resources/alternativesecurityid) schema.
+Adds an `AlternativeSecurityId` to an `alternativeSecurityIdCollection` claim.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | key | string | The ClaimType that specifies the unique user identifier used by the social identity provider. |
-| InputClaim | identityProvider | string | The ClaimType that specifies the social account identity provider name, such as facebook.com. |
-| OutputClaim | alternativeSecurityId | string | The ClaimType that is produced after the ClaimsTransformation has been invoked. Contains information about the identity of a social account user. The **issuer** is the value of the `identityProvider` claim. The **issuerUserId** is the value of the `key` claim in base64 format. |
+| InputClaim | Element | string | The claim to be added to the output claim. |
+| InputClaim | collection | alternativeSecurityIdCollection | The claim that is used by the claims transformation if available in the policy. If provided, the claims transformation adds the `item` at the end of the collection. |
+| OutputClaim | collection | alternativeSecurityIdCollection | The claim that is produced after this claims transformation has been invoked. The new collection that contains both the items from input `collection` and `item`. |
+
+### Example of AddItemToAlternativeSecurityIdCollection
-Use this claims transformation to generate a `alternativeSecurityId` ClaimType. It's used by all social identity provider technical profiles, such as `Facebook-OAUTH`. The following claims transformation receives the user social account ID and the identity provider name. The output of this technical profile is a JSON string format that can be used in Azure AD directory services.
+The following example links a new social identity with an existing account. To link a new social identity:
+
+1. In the **AAD-UserReadUsingAlternativeSecurityId** and **AAD-UserReadUsingObjectId** technical profiles, output the user's **alternativeSecurityIds** claim.
+1. Ask the user to sign in with one of the identity providers that are not associated with this user.
+1. Using the **CreateAlternativeSecurityId** claims transformation, create a new **alternativeSecurityId** claim type with a name of `AlternativeSecurityId2`
+1. Call the **AddItemToAlternativeSecurityIdCollection** claims transformation to add the **AlternativeSecurityId2** claim to the existing **AlternativeSecurityIds** claim.
+1. Persist the **alternativeSecurityIds** claim to the user account
```xml
-<ClaimsTransformation Id="CreateAlternativeSecurityId" TransformationMethod="CreateAlternativeSecurityId">
+<ClaimsTransformation Id="AddAnotherAlternativeSecurityId" TransformationMethod="AddItemToAlternativeSecurityIdCollection">
<InputClaims>
- <InputClaim ClaimTypeReferenceId="issuerUserId" TransformationClaimType="key" />
- <InputClaim ClaimTypeReferenceId="identityProvider" TransformationClaimType="identityProvider" />
+ <InputClaim ClaimTypeReferenceId="AlternativeSecurityId2" TransformationClaimType="item" />
+ <InputClaim ClaimTypeReferenceId="AlternativeSecurityIds" TransformationClaimType="collection" />
</InputClaims> <OutputClaims>
- <OutputClaim ClaimTypeReferenceId="alternativeSecurityId" TransformationClaimType="alternativeSecurityId" />
+ <OutputClaim ClaimTypeReferenceId="AlternativeSecurityIds" TransformationClaimType="collection" />
</OutputClaims> </ClaimsTransformation> ```
-### Example
- - Input claims:
- - **key**: 12334
- - **identityProvider**: Facebook.com
+ - **item**: { "issuer": "facebook.com", "issuerUserId": "MTIzNDU=" }
+ - **collection**: [ { "issuer": "live.com", "issuerUserId": "MTA4MTQ2MDgyOTI3MDUyNTYzMjcw" } ]
- Output claims:
- - **alternativeSecurityId**: { "issuer": "facebook.com", "issuerUserId": "MTA4MTQ2MDgyOTI3MDUyNTYzMjcw"}
+ - **collection**: [ { "issuer": "live.com", "issuerUserId": "MTA4MTQ2MDgyOTI3MDUyNTYzMjcw" }, { "issuer": "facebook.com", "issuerUserId": "MTIzNDU=" } ]
-## AddItemToAlternativeSecurityIdCollection
-Adds an `AlternativeSecurityId` to an `alternativeSecurityIdCollection` claim.
+## CreateAlternativeSecurityId
-| Item | TransformationClaimType | Data Type | Notes |
+Creates a JSON representation of the userΓÇÖs alternativeSecurityId property that can be used in the calls to Azure Active Directory. For more information, see the [AlternativeSecurityId](/graph/api/resources/alternativesecurityid) schema.
+
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | item | string | The ClaimType to be added to the output claim. |
-| InputClaim | collection | alternativeSecurityIdCollection | The ClaimTypes that are used by the claims transformation if available in the policy. If provided, the claims transformation adds the `item` at the end of the collection. |
-| OutputClaim | collection | alternativeSecurityIdCollection | The ClaimTypes that are produced after this ClaimsTransformation has been invoked. The new collection that contains both the items from input `collection` and `item`. |
+| InputClaim | key | string | The claim that specifies the unique user identifier used by the social identity provider. |
+| InputClaim | identityProvider | string | The claim that specifies the social account identity provider name, such as facebook.com. |
+| OutputClaim | alternativeSecurityId | string | The claim that is produced after the claims transformation has been invoked. Contains information about the identity of a social account user. The **issuer** is the value of the `identityProvider` claim. The **issuerUserId** is the value of the `key` claim in base64 format. |
-The following example links a new social identity with an existing account. To link a new social identity:
-1. In the **AAD-UserReadUsingAlternativeSecurityId** and **AAD-UserReadUsingObjectId** technical profiles, output the user's **alternativeSecurityIds** claim.
-1. Ask the user to sign in with one of the identity providers that are not associated with this user.
-1. Using the **CreateAlternativeSecurityId** claims transformation, create a new **alternativeSecurityId** claim type with a name of `AlternativeSecurityId2`
-1. Call the **AddItemToAlternativeSecurityIdCollection** claims transformation to add the **AlternativeSecurityId2** claim to the existing **AlternativeSecurityIds** claim.
-1. Persist the **alternativeSecurityIds** claim to the user account
+### Example of CreateAlternativeSecurityId
+
+Use this claims transformation to generate a `alternativeSecurityId` claim. It's used by all social identity provider technical profiles, such as `Facebook-OAUTH`. The following claims transformation receives the user social account ID and the identity provider name. The output of this technical profile is a JSON string format that can be used in Azure AD directory services.
```xml
-<ClaimsTransformation Id="AddAnotherAlternativeSecurityId" TransformationMethod="AddItemToAlternativeSecurityIdCollection">
+<ClaimsTransformation Id="CreateAlternativeSecurityId" TransformationMethod="CreateAlternativeSecurityId">
<InputClaims>
- <InputClaim ClaimTypeReferenceId="AlternativeSecurityId2" TransformationClaimType="item" />
- <InputClaim ClaimTypeReferenceId="AlternativeSecurityIds" TransformationClaimType="collection" />
+ <InputClaim ClaimTypeReferenceId="issuerUserId" TransformationClaimType="key" />
+ <InputClaim ClaimTypeReferenceId="identityProvider" TransformationClaimType="identityProvider" />
</InputClaims> <OutputClaims>
- <OutputClaim ClaimTypeReferenceId="AlternativeSecurityIds" TransformationClaimType="collection" />
+ <OutputClaim ClaimTypeReferenceId="alternativeSecurityId" TransformationClaimType="alternativeSecurityId" />
</OutputClaims> </ClaimsTransformation> ```
-### Example
- - Input claims:
- - **item**: { "issuer": "facebook.com", "issuerUserId": "MTIzNDU=" }
- - **collection**: [ { "issuer": "live.com", "issuerUserId": "MTA4MTQ2MDgyOTI3MDUyNTYzMjcw" } ]
+ - **key**: 12334
+ - **identityProvider**: Facebook.com
- Output claims:
- - **collection**: [ { "issuer": "live.com", "issuerUserId": "MTA4MTQ2MDgyOTI3MDUyNTYzMjcw" }, { "issuer": "facebook.com", "issuerUserId": "MTIzNDU=" } ]
+ - **alternativeSecurityId**: { "issuer": "facebook.com", "issuerUserId": "MTA4MTQ2MDgyOTI3MDUyNTYzMjcw"}
## GetIdentityProvidersFromAlternativeSecurityIdCollectionTransformation Returns list of issuers from the **alternativeSecurityIdCollection** claim into a new **stringCollection** claim.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | alternativeSecurityIdCollection | alternativeSecurityIdCollection | The ClaimType to be used to get the list of identity providers (issuer). |
-| OutputClaim | identityProvidersCollection | stringCollection | The ClaimTypes that are produced after this ClaimsTransformation has been invoked. List of identity providers associate with the alternativeSecurityIdCollection input claim |
+| InputClaim | alternativeSecurityIdCollection | alternativeSecurityIdCollection | The claim to be used to get the list of identity providers (issuer). |
+| OutputClaim | identityProvidersCollection | stringCollection | The claim that is produced after this claims transformation has been invoked. A list of identity providers associated with the input claim. |
+
+### Example of GetIdentityProvidersFromAlternativeSecurityIdCollectionTransformation
The following claims transformation reads the user **alternativeSecurityIds** claim and extracts the list of identity provider names associated with that account. Use output **identityProvidersCollection** to show the user the list of identity providers associated with the account. Or, on the identity provider selection page, filter the list of identity providers based on output **identityProvidersCollection** claim. So, user can select to link new social identity that is not already associated with the account.
The following claims transformation reads the user **alternativeSecurityIds** cl
``` - Input claims:
- - **alternativeSecurityIdCollection**: [ { "issuer": "google.com", "issuerUserId": "MTA4MTQ2MDgyOTI3MDUyNTYzMjcw" }, { "issuer": "facebook.com", "issuerUserId": "MTIzNDU=" } ]
+ - **alternativeSecurityIdCollection**: [ { "issuer": "google.com", "issuerUserId": "MTA4MTQ2MDgyOTI3MDUyNTYzMjcw" }, { "issuer": "facebook.com", "issuerUserId": "MTIzNDU=" } ]
- Output claims:
- - **identityProvidersCollection**: [ "facebook.com", "google.com" ]
+ - **identityProvidersCollection**: [ "facebook.com", "google.com" ]
## RemoveAlternativeSecurityIdByIdentityProvider Removes an **AlternativeSecurityId** from an **alternativeSecurityIdCollection** claim.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | identityProvider | string | The ClaimType that contains the identity provider name to be removed from the collection. |
-| InputClaim | collection | alternativeSecurityIdCollection | The ClaimTypes that are used by the claims transformation. The claims transformation removes the identityProvider from the collection. |
-| OutputClaim | collection | alternativeSecurityIdCollection | The ClaimTypes that are produced after this ClaimsTransformation has been invoked. The new collection, after the identityProvider removed from the collection. |
+| InputClaim | identityProvider | string | The claim that contains the identity provider name to be removed from the collection. |
+| InputClaim | collection | alternativeSecurityIdCollection | The claim that is used by the claims transformation. The claims transformation removes the identityProvider from the collection. |
+| OutputClaim | collection | alternativeSecurityIdCollection | The claim that is produced after this claims transformation has been invoked. The new collection, after the identityProvider removed from the collection. |
+
+### Example of RemoveAlternativeSecurityIdByIdentityProvider
+
+The following example unlinks one of the social identities with an existing account. To unlink a social identity:
-The following example unlinks one of the social identity with an existing account. To unlink a social identity:
1. In the **AAD-UserReadUsingAlternativeSecurityId** and **AAD-UserReadUsingObjectId** technical profiles, output the user's **alternativeSecurityIds** claim. 2. Ask the user to select which social account to remove from the list identity providers that are associated with this user. 3. Call a claims transformation technical profile that calls the **RemoveAlternativeSecurityIdByIdentityProvider** claims transformation, that removed the selected social identity, using identity provider name.
The following example unlinks one of the social identity with an existing accoun
</ClaimsTransformations> ```
-### Example
- - Input claims:
- - **identityProvider**: facebook.com
- - **collection**: [ { "issuer": "live.com", "issuerUserId": "MTA4MTQ2MDgyOTI3MDUyNTYzMjcw" }, { "issuer": "facebook.com", "issuerUserId": "MTIzNDU=" } ]
+ - **identityProvider**: facebook.com
+ - **collection**: [ { "issuer": "live.com", "issuerUserId": "MTA4MTQ2MDgyOTI3MDUyNTYzMjcw" }, { "issuer": "facebook.com", "issuerUserId": "MTIzNDU=" } ]
- Output claims:
- - **collection**: [ { "issuer": "live.com", "issuerUserId": "MTA4MTQ2MDgyOTI3MDUyNTYzMjcw" } ]
+ - **collection**: [ { "issuer": "live.com", "issuerUserId": "MTA4MTQ2MDgyOTI3MDUyNTYzMjcw" } ]
+
+## Next steps
+
+- Find more [claims transformation samples](https://github.com/azure-ad-b2c/unit-tests/tree/main/claims-transformation) on the Azure AD B2C community GitHub repo
active-directory-b2c String Transformations https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/active-directory-b2c/string-transformations.md
Previously updated : 12/9/2021 Last updated : 01/17/2022 # String claims transformations -
-This article provides examples for using the string claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [ClaimsTransformations](claimstransformations.md).
+This article provides examples for using the string claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [claims transformations](claimstransformations.md).
## AssertStringClaimsAreEqual
-Compare two claims, and throw an exception if they are not equal according to the specified comparison inputClaim1, inputClaim2 and stringComparison.
+Compares two claims, and throw an exception if they are not equal according to the specified comparison inputClaim1, inputClaim2 and stringComparison.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim1 | string | First claim's type, which is to be compared. | | InputClaim | inputClaim2 | string | Second claim's type, which is to be compared. |
Compare two claims, and throw an exception if they are not equal according to th
The **AssertStringClaimsAreEqual** claims transformation is always executed from a [validation technical profile](validation-technical-profile.md) that is called by a [self-asserted technical profile](self-asserted-technical-profile.md), or a [DisplayControl](display-controls.md). The `UserMessageIfClaimsTransformationStringsAreNotEqual` metadata of a self-asserted technical profile controls the error message that is presented to the user. The error messages can be [localized](localization-string-ids.md#claims-transformations-error-messages). - ![AssertStringClaimsAreEqual execution](./media/string-transformations/assert-execution.png)
-You can use this claims transformation to make sure, two ClaimTypes have the same value. If not, an error message is thrown. The following example checks that the **strongAuthenticationEmailAddress** ClaimType is equal to **email** ClaimType. Otherwise an error message is thrown.
+### Example of AssertStringClaimsAreEqual
+
+You can use this claims transformation to make sure, two claims have the same value. If not, an error message is thrown. The following example checks that the **strongAuthenticationEmailAddress** claim is equal to **email** claim. Otherwise an error message is thrown.
```xml <ClaimsTransformation Id="AssertEmailAndStrongAuthenticationEmailAddressAreEqual" TransformationMethod="AssertStringClaimsAreEqual">
You can use this claims transformation to make sure, two ClaimTypes have the sam
</ClaimsTransformation> ```
+- Input claims:
+ - **inputClaim1**: someone@contoso.com
+ - **inputClaim2**: someone@outlook.com
+- Input parameters:
+ - **stringComparison**: ordinalIgnoreCase
+- Result: Error thrown
+
+### Calling the AssertStringClaimsAreEqual claims transformation
The **login-NonInteractive** validation technical profile calls the **AssertEmailAndStrongAuthenticationEmailAddressAreEqual** claims transformation.+ ```xml <TechnicalProfile Id="login-NonInteractive"> ...
The self-asserted technical profile calls the validation **login-NonInteractive*
</TechnicalProfile> ```
-### Example
--- Input claims:
- - **inputClaim1**: someone@contoso.com
- - **inputClaim2**: someone@outlook.com
-- Input parameters:
- - **stringComparison**: ordinalIgnoreCase
-- Result: Error thrown- ## BuildUri
-Create the TOTP URI. The URI is a combination of the user's unique identifier, such as email address, and a secret key. The URI is later converted into a QR code that is presented to the user.
+Creates a time based on time password (TOTP) URI. The URI is a combination of the user's unique identifier, such as email address, and a secret key. The URI is later converted into a QR code that is presented to the user.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | path | string | The user's unique identifier, such as email address, username, or phone number. | | InputClaim| query.secret| string | The TOTP secret key. | |InputParameter | scheme| string| The scheme part of the URI. For example, `otpauth`.| |InputParameter | host| string| The scheme part of the URI. For example, `totp`.| |InputParameter | query.issuer| string| The issuer part of the URI. For example, `{AuthenticatorIssuer}`.|
-| OutputClaim | outputClaim | string | The ClaimType that is produced after this claims transformation has been invoked. |
+| OutputClaim | outputClaim | string | The claim that is produced after this claims transformation has been invoked. |
+
+### Example of BuildUri
-Use this claims transformation to generate a TOTP URI that will be displayed in the QR Code, or deep link.
+The following claims transformation generates a TOTP URI that will be displayed in the QR Code, or deep link.
```xml <ClaimsTransformation Id="CreateUriString" TransformationMethod="BuildUri">
Use this claims transformation to generate a TOTP URI that will be displayed in
</ClaimsTransformation> ```
-### Example
- - Input claims: - **path**: emily@fabrikam.com - **query.secret**: `fay2lj7ynpntjgqa` - Input parameters:
- - **scheme**: `otpauth`
- - **host**: `totp`
- - **query.issuer**: `{AuthenticatorIssuer}`
+ - **scheme**: `otpauth`
+ - **host**: `totp`
+ - **query.issuer**: `{AuthenticatorIssuer}`
- Output claims: - **outputClaim**: `otpauth://totp/Contoso%20demo:emily@fabrikam.com?secret=fay2lj7ynpntjgqa&issuer=Contoso+demo`
Use this claims transformation to generate a TOTP URI that will be displayed in
Changes the case of the provided claim to lower or upper case depending on the operator.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | inputClaim1 | string | The ClaimType to be changed. |
+| InputClaim | inputClaim1 | string | The claim to be changed. |
| InputParameter | toCase | string | One of the following values: `LOWER` or `UPPER`. |
-| OutputClaim | outputClaim | string | The ClaimType that is produced after this claims transformation has been invoked. |
+| OutputClaim | outputClaim | string | The claim that is produced after this claims transformation has been invoked. |
+
+### Example of ChangeCase
-Use this claim transformation to change any string ClaimType to lower or upper case.
+The following claim transformation changes the email claim to lower case.
```xml <ClaimsTransformation Id="ChangeToLower" TransformationMethod="ChangeCase">
Use this claim transformation to change any string ClaimType to lower or upper c
</ClaimsTransformation> ```
-### Example
- - Input claims: - **email**: SomeOne@contoso.com - Input parameters:
- - **toCase**: LOWER
+ - **toCase**: LOWER
- Output claims: - **email**: someone@contoso.com
-## CreateStringClaim
+## CompareClaims
-Creates a string claim from the provided input parameter in the transformation.
+Determines whether one string claim is equal to another. The result is a new boolean claim with a value of `true` or `false`.
-| Item | TransformationClaimType | Data Type | Notes |
-|-- | -- | | -- |
-| InputParameter | value | string | The string to be set. This input parameter supports [string claims transformation expressions](string-transformations.md#string-claim-transformations-expressions). |
-| OutputClaim | createdClaim | string | The ClaimType that is produced after this claims transformation has been invoked, with the value specified in the input parameter. |
+| Element | TransformationClaimType | Data Type | Notes |
+| - | -- | | -- |
+| InputClaim | inputClaim1 | string | First claim type, which is to be compared. |
+| InputClaim | inputClaim2 | string | Second claim type, which is to be compared. |
+| InputParameter | operator | string | Possible values: `EQUAL` or `NOT EQUAL`. |
+| InputParameter | ignoreCase | boolean | Specifies whether this comparison should ignore the case of the strings being compared. |
+| OutputClaim | outputClaim | boolean | The claim that is produced after this claims transformation has been invoked. |
-Use this claims transformation to set a string ClaimType value.
+### Example of CompareClaims
+
+Use this claims transformation to check if a claim is equal to another claim. The following claims transformation checks if the value of the **email** claim is identical to the **Verified.Email** claim.
```xml
-<ClaimsTransformation Id="CreateTermsOfService" TransformationMethod="CreateStringClaim">
+<ClaimsTransformation Id="CheckEmail" TransformationMethod="CompareClaims">
+ <InputClaims>
+ <InputClaim ClaimTypeReferenceId="Email" TransformationClaimType="inputClaim1" />
+ <InputClaim ClaimTypeReferenceId="Verified.Email" TransformationClaimType="inputClaim2" />
+ </InputClaims>
<InputParameters>
- <InputParameter Id="value" DataType="string" Value="Contoso terms of service..." />
+ <InputParameter Id="operator" DataType="string" Value="NOT EQUAL" />
+ <InputParameter Id="ignoreCase" DataType="string" Value="true" />
</InputParameters> <OutputClaims>
- <OutputClaim ClaimTypeReferenceId="TOS" TransformationClaimType="createdClaim" />
+ <OutputClaim ClaimTypeReferenceId="SameEmailAddress" TransformationClaimType="outputClaim" />
</OutputClaims> </ClaimsTransformation> ```
-### Example
--- Input parameter:
- - **value**: Contoso terms of service...
+- Input claims:
+ - **inputClaim1**: someone@contoso.com
+ - **inputClaim2**: someone@outlook.com
+- Input parameters:
+ - **operator**: NOT EQUAL
+ - **ignoreCase**: true
- Output claims:
- - **createdClaim**: The TOS ClaimType contains the "Contoso terms of service..." value.
+ - **outputClaim**: true
-## CreateOtpSecret
+## CompareClaimToValue
-Creates a TOTP string claim. The output of this claims transformation is a TOTP secret that is later stored in the Azure AD B2C user's account and shared with the Microsoft Authenticator app. The authenticator app uses the key to generate TOTP codes when the user needs to go through MFA. Your policy uses the key to validate the TOTP code provided by the user.
+Determines whether a claim value is equal to the input parameter value.
-| Item | TransformationClaimType | Data Type | Notes |
-|-- | -- | | -- |
-| OutputClaim | outputClaim | string | The ClaimType that is produced after this claims transformation has been invoked, with the generated TOTP code. |
+| Element | TransformationClaimType | Data Type | Notes |
+| - | -- | | -- |
+| InputClaim | inputClaim1 | string | The claim's type, which is to be compared. |
+| InputParameter | operator | string | Possible values: `EQUAL` or `NOT EQUAL`. |
+| InputParameter | compareTo | string | String comparison, one of the values: Ordinal, OrdinalIgnoreCase. |
+| InputParameter | ignoreCase | boolean | Specifies whether this comparison should ignore the case of the strings being compared. |
+| OutputClaim | outputClaim | boolean | The claim that is produced after this claims transformation has been invoked. |
-Use this claims transformation to create a secret for the TOTP multi-factor authenticator.
+### Example of CompareClaimToValue
+
+Use this claims transformation to check if a claim is equal to a value you specified. For example, the following claims transformation checks if the value of the **termsOfUseConsentVersion** claim is equal to `v1`.
```xml
-<ClaimsTransformation Id="CreateSecret" TransformationMethod="CreateOtpSecret">
+<ClaimsTransformation Id="IsTermsOfUseConsentRequiredForVersion" TransformationMethod="CompareClaimToValue">
+ <InputClaims>
+ <InputClaim ClaimTypeReferenceId="termsOfUseConsentVersion" TransformationClaimType="inputClaim1" />
+ </InputClaims>
+ <InputParameters>
+ <InputParameter Id="compareTo" DataType="string" Value="V1" />
+ <InputParameter Id="operator" DataType="string" Value="not equal" />
+ <InputParameter Id="ignoreCase" DataType="string" Value="true" />
+ </InputParameters>
<OutputClaims>
- <OutputClaim ClaimTypeReferenceId="secretKey" TransformationClaimType="outputClaim" />
+ <OutputClaim ClaimTypeReferenceId="termsOfUseConsentRequired" TransformationClaimType="outputClaim" />
</OutputClaims> </ClaimsTransformation> ```
-### Example
-
+- Input claims:
+ - **inputClaim1**: v1
+- Input parameters:
+ - **compareTo**: V1
+ - **operator**: EQUAL
+ - **ignoreCase**: true
- Output claims:
- - **outputClaim**: `hmlcmd4ph6fph64c`
-
+ - **outputClaim**: true
## CopyClaimIfPredicateMatch
-Copy value of a claim to another if the value of the input claim matches the output claim predicate.
+Copies value of a claim to another if the value of the input claim matches the output claim predicate.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim | string | The claim type, which is to be copied. | | OutputClaim | outputClaim | string | The claim type that is produced after this claims transformation has been invoked. The value of the input claim is checked against this claim predicate. |
-The following example copies the signInName claim value to phoneNumber claim, only if the signInName is a phone number. For the complete sample, see [Phone number or email sign-in](https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/blob/master/scenarios/phone-number-passwordless/Phone_Email_Base.xml) starter pack policy.
+### Example of CopyClaimIfPredicateMatch
+
+The following example tries to copy the signInName claim value to phoneNumber claim. In this example, the value will not be copied. The signInName claim is not in the expected format, phone number. For the complete sample, see [Phone number or email sign-in](https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/blob/master/scenarios/phone-number-passwordless/Phone_Email_Base.xml) starter pack policy.
```xml <ClaimsTransformation Id="SetPhoneNumberIfPredicateMatch" TransformationMethod="CopyClaimIfPredicateMatch">
The following example copies the signInName claim value to phoneNumber claim, on
</ClaimsTransformation> ```
-### Example 1
--- Input claims:
- - **inputClaim**: bob@contoso.com
-- Output claims:
- - **outputClaim**: The output claim won't be changed from its original value.
-
-### Example 2
- - Input claims:
- - **inputClaim**: +11234567890
+ - **inputClaim**: bob@contoso.com
- Output claims:
- - **outputClaim**: +11234567890
+ - **outputClaim**: The output claim won't be changed from its original value.
-## CompareClaims
-
-Determine whether one string claim is equal to another. The result is a new boolean ClaimType with a value of `true` or `false`.
-
-| Item | TransformationClaimType | Data Type | Notes |
-| - | -- | | -- |
-| InputClaim | inputClaim1 | string | First claim type, which is to be compared. |
-| InputClaim | inputClaim2 | string | Second claim type, which is to be compared. |
-| InputParameter | operator | string | Possible values: `EQUAL` or `NOT EQUAL`. |
-| InputParameter | ignoreCase | boolean | Specifies whether this comparison should ignore the case of the strings being compared. |
-| OutputClaim | outputClaim | boolean | The ClaimType that is produced after this claims transformation has been invoked. |
-
-Use this claims transformation to check if a claim is equal to another claim. For example, the following claims transformation checks if the value of the **email** claim is equal to the **Verified.Email** claim.
-
-```xml
-<ClaimsTransformation Id="CheckEmail" TransformationMethod="CompareClaims">
- <InputClaims>
- <InputClaim ClaimTypeReferenceId="Email" TransformationClaimType="inputClaim1" />
- <InputClaim ClaimTypeReferenceId="Verified.Email" TransformationClaimType="inputClaim2" />
- </InputClaims>
- <InputParameters>
- <InputParameter Id="operator" DataType="string" Value="NOT EQUAL" />
- <InputParameter Id="ignoreCase" DataType="string" Value="true" />
- </InputParameters>
- <OutputClaims>
- <OutputClaim ClaimTypeReferenceId="SameEmailAddress" TransformationClaimType="outputClaim" />
- </OutputClaims>
-</ClaimsTransformation>
-```
+### Example of CopyClaimIfPredicateMatch that muches the predicate
-### Example
+In this example, the claims transformation will copy the value. The signInName claim is in the correct format, phone number.
- Input claims:
- - **inputClaim1**: someone@contoso.com
- - **inputClaim2**: someone@outlook.com
-- Input parameters:
- - **operator**: NOT EQUAL
- - **ignoreCase**: true
+ - **inputClaim**: +11234567890
- Output claims:
- - **outputClaim**: true
+ - **outputClaim**: +11234567890
-## CompareClaimToValue
+## CreateOtpSecret
-Determines whether a claim value is equal to the input parameter value.
+Creates a TOTP string claim. The output of this claims transformation is a TOTP secret that is later stored in the Azure AD B2C user's account and shared with the Microsoft Authenticator app. The authenticator app uses the key to generate TOTP codes when the user needs to go through MFA. Your policy uses the key to validate the TOTP code provided by the user.
-| Item | TransformationClaimType | Data Type | Notes |
-| - | -- | | -- |
-| InputClaim | inputClaim1 | string | The claim's type, which is to be compared. |
-| InputParameter | operator | string | Possible values: `EQUAL` or `NOT EQUAL`. |
-| InputParameter | compareTo | string | String comparison, one of the values: Ordinal, OrdinalIgnoreCase. |
-| InputParameter | ignoreCase | boolean | Specifies whether this comparison should ignore the case of the strings being compared. |
-| OutputClaim | outputClaim | boolean | The ClaimType that is produced after this claims transformation has been invoked. |
+| Element | TransformationClaimType | Data Type | Notes |
+|-- | -- | | -- |
+| OutputClaim | outputClaim | string | The claim that is produced after this claims transformation has been invoked, with the generated TOTP code. |
-You can use this claims transformation to check if a claim is equal to a value you specified. For example, the following claims transformation checks if the value of the **termsOfUseConsentVersion** claim is equal to `v1`.
+### Example of CreateOtpSecret
+
+The following claims transformation creates a secret for the TOTP multi-factor authenticator.
```xml
-<ClaimsTransformation Id="IsTermsOfUseConsentRequiredForVersion" TransformationMethod="CompareClaimToValue">
- <InputClaims>
- <InputClaim ClaimTypeReferenceId="termsOfUseConsentVersion" TransformationClaimType="inputClaim1" />
- </InputClaims>
- <InputParameters>
- <InputParameter Id="compareTo" DataType="string" Value="V1" />
- <InputParameter Id="operator" DataType="string" Value="not equal" />
- <InputParameter Id="ignoreCase" DataType="string" Value="true" />
- </InputParameters>
+<ClaimsTransformation Id="CreateSecret" TransformationMethod="CreateOtpSecret">
<OutputClaims>
- <OutputClaim ClaimTypeReferenceId="termsOfUseConsentRequired" TransformationClaimType="outputClaim" />
+ <OutputClaim ClaimTypeReferenceId="secretKey" TransformationClaimType="outputClaim" />
</OutputClaims> </ClaimsTransformation> ```
-### Example
-- Input claims:
- - **inputClaim1**: v1
-- Input parameters:
- - **compareTo**: V1
- - **operator**: EQUAL
- - **ignoreCase**: true
- Output claims:
- - **outputClaim**: true
+ - **outputClaim**: `hmlcmd4ph6fph64c`
## CreateRandomString Creates a random string using the random number generator. If the random number generator is of type `integer`, optionally a seed parameter and a maximum number may be provided. An optional string format parameter allows the output to be formatted using it, and an optional base64 parameter specifies whether the output is base64 encoded randomGeneratorType [guid, integer] outputClaim (String).
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputParameter | randomGeneratorType | string | Specifies the random value to be generated, `GUID` (global unique ID) or `INTEGER` (a number). | | InputParameter | stringFormat | string | [Optional] Format the random value. | | InputParameter | base64 | boolean | [Optional] Convert the random value to base64. If string format is applied, the value after string format is encoded to base64. | | InputParameter | maximumNumber | int | [Optional] For `INTEGER` randomGeneratorType only. Specify the maximum number. | | InputParameter | seed | int | [Optional] For `INTEGER` randomGeneratorType only. Specify the seed for the random value. Note: same seed yields same sequence of random numbers. |
-| OutputClaim | outputClaim | string | The ClaimTypes that will be produced after this claims transformation has been invoked. The random value. |
+| OutputClaim | outputClaim | string | The claims that will be produced after this claims transformation has been invoked. The random value. |
+
+### Example of CreateRandomString
Following example generates a global unique ID. This claims transformation is used to create the random UPN (user principle name).
Following example generates a global unique ID. This claims transformation is us
</ClaimsTransformation> ```
-### Example
- - Input parameters:
- - **randomGeneratorType**: GUID
+ - **randomGeneratorType**: GUID
- Output claims:
- - **outputClaim**: bc8bedd2-aaa3-411e-bdee-2f1810b73dfc
+ - **outputClaim**: bc8bedd2-aaa3-411e-bdee-2f1810b73dfc
+
+### Example of CreateRandomString the create a numeric value
Following example generates an integer random value between 0 and 1000. The value is formatted to OTP_{random value}.
Following example generates an integer random value between 0 and 1000. The valu
</ClaimsTransformation> ```
-### Example
- - Input parameters:
- - **randomGeneratorType**: INTEGER
- - **maximumNumber**: 1000
- - **stringFormat**: OTP_{0}
- - **base64**: false
+ - **randomGeneratorType**: INTEGER
+ - **maximumNumber**: 1000
+ - **stringFormat**: OTP_{0}
+ - **base64**: false
- Output claims:
- - **outputClaim**: OTP_853
+ - **outputClaim**: OTP_853
+## CreateStringClaim
-## FormatLocalizedString
+Creates a string claim from the provided input parameter in the transformation.
+
+| Element | TransformationClaimType | Data Type | Notes |
+|-- | -- | | -- |
+| InputParameter | value | string | The string to be set. This input parameter supports [string claims transformation expressions](string-transformations.md#string-claim-transformations-expressions). |
+| OutputClaim | createdClaim | string | The claim that is produced after this claims transformation has been invoked, with the value specified in the input parameter. |
+
+### Example of CreateStringClaim
+
+The following claims transformation creates a string value with terms of service.
+
+```xml
+<ClaimsTransformation Id="CreateTermsOfService" TransformationMethod="CreateStringClaim">
+ <InputParameters>
+ <InputParameter Id="value" DataType="string" Value="Contoso terms of service..." />
+ </InputParameters>
+ <OutputClaims>
+ <OutputClaim ClaimTypeReferenceId="TOS" TransformationClaimType="createdClaim" />
+ </OutputClaims>
+</ClaimsTransformation>
+```
-Format multiple claims according to a provided localized format string. This transformation uses the C# `String.Format` method.
+- Input parameter:
+ - **value**: Contoso terms of service...
+- Output claims:
+ - **createdClaim**: The TOS claim contains the "Contoso terms of service..." value.
+
+## FormatLocalizedString
+Formats multiple claims according to a provided localized format string. This transformation uses the C# `String.Format` method.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaims | |string | The collection of input claims that acts as string format {0}, {1}, {2} parameters. | | InputParameter | stringFormatId | string | The `StringId` of a [localized string](localization.md). |
-| OutputClaim | outputClaim | string | The ClaimType that is produced after this claims transformation has been invoked. |
+| OutputClaim | outputClaim | string | The claim that is produced after this claims transformation has been invoked. |
> [!NOTE] > String format maximum allowed size is 4000.
To use the FormatLocalizedString claims transformation:
1. In the claims transformation, specify the list of claims to be set with the localized string. Then set the `stringFormatId` to the `StringId` of the localized string element. 1. In a [self-asserted technical profile](self-asserted-technical-profile.md), or a [display control](display-controls.md) input or output claims transformation, make a reference to your claims transformation.
+### Example of FormatLocalizedString
The following example generates an error message when an account is already in the directory. The example defines localized strings for English (default) and Spanish.
The claims transformation creates a response message based on the localized stri
</ClaimsTransformation> ```
-### Example
- - Input claims:
- - **inputClaim**: sarah@contoso.com
+ - **inputClaim**: sarah@contoso.com
- Input parameters:
- - **stringFormat**: ResponseMessge_EmailExists
+ - **stringFormat**: ResponseMessge_EmailExists
- Output claims: - **outputClaim**: The email 'sarah@contoso.com' is already an account in this organization. Click Next to sign in with that account. - ## FormatStringClaim
-Format a claim according to the provided format string. This transformation uses the C# `String.Format` method.
+Formats a claim according to the provided format string. This transformation uses the C# `String.Format` method.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | inputClaim |string |The ClaimType that acts as string format {0} parameter. |
+| InputClaim | inputClaim |string |The claim that acts as string format {0} parameter. |
| InputParameter | stringFormat | string | The string format, including the {0} parameter. This input parameter supports [string claims transformation expressions](string-transformations.md#string-claim-transformations-expressions). |
-| OutputClaim | outputClaim | string | The ClaimType that is produced after this claims transformation has been invoked. |
+| OutputClaim | outputClaim | string | The claim that is produced after this claims transformation has been invoked. |
> [!NOTE] > String format maximum allowed size is 4000.
+### Example of FormatStringClaim
+ Use this claims transformation to format any string with one parameter {0}. The following example creates a **userPrincipalName**. All social identity provider technical profiles, such as `Facebook-OAUTH` calls the **CreateUserPrincipalName** to generate a **userPrincipalName**. ```xml
Use this claims transformation to format any string with one parameter {0}. The
</ClaimsTransformation> ```
-### Example
- - Input claims:
- - **inputClaim**: 5164db16-3eee-4629-bfda-dcc3326790e9
+ - **inputClaim**: 5164db16-3eee-4629-bfda-dcc3326790e9
- Input parameters:
- - **stringFormat**: cpim_{0}@{RelyingPartyTenantId}
+ - **stringFormat**: cpim_{0}@{RelyingPartyTenantId}
- Output claims: - **outputClaim**: cpim_5164db16-3eee-4629-bfda-dcc3326790e9@b2cdemo.onmicrosoft.com ## FormatStringMultipleClaims
-Format two claims according to the provided format string. This transformation uses the C# `String.Format` method.
+Formats two claims according to the provided format string. This transformation uses the C# `String.Format` method.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | inputClaim1 |string | The ClaimType that acts as string format {0} parameter. |
-| InputClaim | inputClaim2 | string | The ClaimType that acts as string format {1} parameter. |
+| InputClaim | inputClaim1 |string | The claim that acts as string format {0} parameter. |
+| InputClaim | inputClaim2 | string | The claim that acts as string format {1} parameter. |
| InputParameter | stringFormat | string | The string format, including the {0} and {1} parameters. This input parameter supports [string claims transformation expressions](string-transformations.md#string-claim-transformations-expressions). |
-| OutputClaim | outputClaim | string | The ClaimType that is produced after this claims transformation has been invoked. |
+| OutputClaim | outputClaim | string | The claim that is produced after this claims transformation has been invoked. |
> [!NOTE] > String format maximum allowed size is 4000.
+### Example of FormatStringMultipleClaims
+ Use this claims transformation to format any string with two parameters, {0} and {1}. The following example creates a **displayName** with the specified format: ```xml
Use this claims transformation to format any string with two parameters, {0} and
</ClaimsTransformation> ```
-### Example
- - Input claims:
- - **inputClaim1**: Joe
- - **inputClaim2**: Fernando
+ - **inputClaim1**: Joe
+ - **inputClaim2**: Fernando
- Input parameters:
- - **stringFormat**: {0} {1}
+ - **stringFormat**: {0} {1}
- Output claims:
- - **outputClaim**: Joe Fernando
+ - **outputClaim**: Joe Fernando
## GetLocalizedStringsTransformation Copies localized strings into claims.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | OutputClaim | The name of the localized string | string | List of claim types that are produced after this claims transformation has been invoked. |
To use the GetLocalizedStringsTransformation claims transformation:
1. Define a [localization string](localization.md) and associate it with a [self-asserted-technical-profile](self-asserted-technical-profile.md). 1. The `ElementType` of the `LocalizedString` element must be set to `GetLocalizedStringsTransformationClaimType`. 1. The `StringId` is a unique identifier that you define, and use it later in your claims transformation.
-1. In the claims transformation, specify the list of claims to be set with the localized string. The `ClaimTypeReferenceId` is a reference to a ClaimType already defined in the ClaimsSchema section in the policy. The `TransformationClaimType` is the name of the localized string as defined in the `StringId` of the `LocalizedString` element.
+1. In the claims transformation, specify the list of claims to be set with the localized string. The `ClaimTypeReferenceId` is a reference to a claim already defined in the ClaimsSchema section in the policy. The `TransformationClaimType` is the name of the localized string as defined in the `StringId` of the `LocalizedString` element.
1. In a [self-asserted technical profile](self-asserted-technical-profile.md), or a [display control](display-controls.md) input or output claims transformation, make a reference to your claims transformation. ![GetLocalizedStringsTransformation](./media/string-transformations/get-localized-strings-transformation.png)
+### Example of GetLocalizedStringsTransformation
+ The following example looks up the email subject, body, your code message, and the signature of the email, from localized strings. The claims later used by custom email verification template. Define localized strings for English (default) and Spanish.
The claims transformation sets the value of the claim type *subject* with the va
</ClaimsTransformation> ```
-### Example
- - Output claims: - **subject**: Contoso account email verification code - **message**: Thanks for verifying your account!
The claims transformation sets the value of the claim type *subject* with the va
## GetMappedValueFromLocalizedCollection
-Looking up an item from a claim **Restriction** collection.
+Maps an element from the input claim's **Restriction** collection.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | mapFromClaim | string | The claim that contains the text to be looked up in the **restrictionValueClaim** claims with the **Restriction** collection. | | OutputClaim | restrictionValueClaim | string | The claim that contains the **Restriction** collection. After the claims transformation has been invoked, the value of this claim contains the value of the selected item. |
+### Example of GetMappedValueFromLocalizedCollection
+ The following example looks up the error message description based on the error key. The **responseMsg** claim contains a collection of error messages to present to the end user or to be sent to the relying party. ```xml
The following example looks up the error message description based on the error
</Restriction> </ClaimType> ```+ The claims transformation looks up the text of the item and returns its value. If the restriction is localized using `<LocalizedCollection>`, the claims transformation returns the localized value. ```xml
The claims transformation looks up the text of the item and returns its value. I
</ClaimsTransformation> ```
-### Example
- - Input claims:
- - **mapFromClaim**: B2C_V1_90001
+ - **mapFromClaim**: B2C_V1_90001
- Output claims:
- - **restrictionValueClaim**: You cannot sign in because you are a minor.
+ - **restrictionValueClaim**: You cannot sign in because you are a minor.
## LookupValue
-Look up a claim value from a list of values based on the value of another claim.
+Looks up a claim value from a list of values based on the value of another claim.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputParameterId | string | The claim that contains the lookup value | | InputParameter | |string | Collection of inputParameters. | | InputParameter | errorOnFailedLookup | boolean | Controlling whether an error is returned when no matching lookup. |
-| OutputClaim | inputParameterId | string | The ClaimTypes that will be produced after this claims transformation has been invoked. The value of the matching `Id`. |
+| OutputClaim | outputClaim | string | The claim that will be produced after this claims transformation has been invoked. The value of the matching `Id`. |
+
+### Example of LookupValue
The following example looks up the domain name in one of the inputParameters collections. The claims transformation looks up the domain name in the identifier and returns its value (an application ID).
The following example looks up the domain name in one of the inputParameters col
</ClaimsTransformation> ```
-### Example
- - Input claims:
- - **inputParameterId**: test.com
+ - **inputParameterId**: test.com
- Input parameters:
- - **contoso.com**: 13c15f79-8fb1-4e29-a6c9-be0d36ff19f1
- - **microsoft.com**: 0213308f-17cb-4398-b97e-01da7bd4804e
- - **test.com**: c7026f88-4299-4cdb-965d-3f166464b8a9
- - **errorOnFailedLookup**: false
+ - **contoso.com**: 13c15f79-8fb1-4e29-a6c9-be0d36ff19f1
+ - **microsoft.com**: 0213308f-17cb-4398-b97e-01da7bd4804e
+ - **test.com**: c7026f88-4299-4cdb-965d-3f166464b8a9
+ - **errorOnFailedLookup**: false
- Output claims:
- - **outputClaim**: c7026f88-4299-4cdb-965d-3f166464b8a9
+ - **outputClaim**: c7026f88-4299-4cdb-965d-3f166464b8a9
+
+### Example of LookupValue with error
When `errorOnFailedLookup` input parameter is set to `true`, the **LookupValue** claims transformation is always executed from a [validation technical profile](validation-technical-profile.md) that is called by a [self-asserted technical profile](self-asserted-technical-profile.md), or a [DisplayConrtol](display-controls.md). The `LookupNotFound` metadata of a self-asserted technical profile controls the error message that is presented to the user.
The following example looks up the domain name in one of the inputParameters col
</ClaimsTransformation> ```
-### Example
- - Input claims:
- - **inputParameterId**: live.com
+ - **inputParameterId**: live.com
- Input parameters:
- - **contoso.com**: 13c15f79-8fb1-4e29-a6c9-be0d36ff19f1
- - **microsoft.com**: 0213308f-17cb-4398-b97e-01da7bd4804e
- - **test.com**: c7026f88-4299-4cdb-965d-3f166464b8a9
- - **errorOnFailedLookup**: true
+ - **contoso.com**: 13c15f79-8fb1-4e29-a6c9-be0d36ff19f1
+ - **microsoft.com**: 0213308f-17cb-4398-b97e-01da7bd4804e
+ - **test.com**: c7026f88-4299-4cdb-965d-3f166464b8a9
+ - **errorOnFailedLookup**: true
- Error:
- - No match found for the input claim value in the list of input parameter ids and errorOnFailedLookup is true.
+ - No match found for the input claim value in the list of input parameter ids and errorOnFailedLookup is true.
## NullClaim
-Clean the value of a given claim.
+Cleans the value of a given claim.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | OutputClaim | claim_to_null | string | The claim's value is set to NULL. |
+### Example of NullClaim
+ Use this claim transformation to remove unnecessary data from the claims property bag so the session cookie will be smaller. The following example removes the value of the `TermsOfService` claim type. ```xml
Use this claim transformation to remove unnecessary data from the claims propert
``` - Input claims:
- - **outputClaim**: Welcome to Contoso App. If you continue to browse and use this website, you are agreeing to comply with and be bound by the following terms and conditions...
+ - **outputClaim**: Welcome to Contoso App. If you continue to browse and use this website, you are agreeing to comply with and be bound by the following terms and conditions...
- Output claims:
- - **outputClaim**: NULL
+ - **outputClaim**: NULL
## ParseDomain Gets the domain portion of an email address.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | emailAddress | string | The ClaimType that contains the email address. |
-| OutputClaim | domain | string | The ClaimType that is produced after this claims transformation has been invoked - the domain. |
+| InputClaim | emailAddress | string | The claim that contains the email address. |
+| OutputClaim | domain | string | The claim that is produced after this claims transformation has been invoked - the domain. |
+
+### Example of ParseDomain
Use this claims transformation to parse the domain name after the @ symbol of the user. The following claims transformation demonstrates how to parse the domain name from an **email** claim.
Use this claims transformation to parse the domain name after the @ symbol of th
</ClaimsTransformation> ```
-### Example
- - Input claims: - **emailAddress**: joe@outlook.com - Output claims:
- - **domain**: outlook.com
+ - **domain**: outlook.com
## SetClaimIfBooleansMatch Checks that a boolean claim is `true`, or `false`. If yes, sets the output claims with the value present in `outputClaimIfMatched` input parameter.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | claimToMatch | string | The claim type, which is to be checked. Null value throws an exception. | | InputParameter | matchTo | string | The value to be compared with `claimToMatch` input claim. Possible values: `true`, or `false`. | | InputParameter | outputClaimIfMatched | string | The value to be set if input claim equals to the `matchTo` input parameter. | | OutputClaim | outputClaim | string | If the `claimToMatch` input claim equals to the `matchTo` input parameter, this output claim contains the value of `outputClaimIfMatched` input parameter. |
+### Example of SetClaimIfBooleansMatch
+ For example, the following claims transformation checks if the value of **hasPromotionCode** claim is equal to `true`. If yes, return the value to *Promotion code not found*. ```xml
For example, the following claims transformation checks if the value of **hasPro
</ClaimsTransformation> ```
-### Example
- - Input claims:
- - **claimToMatch**: true
+ - **claimToMatch**: true
- Input parameters:
- - **matchTo**: true
- - **outputClaimIfMatched**: "Promotion code not found."
+ - **matchTo**: true
+ - **outputClaimIfMatched**: "Promotion code not found."
- Output claims:
- - **outputClaim**: "Promotion code not found."
+ - **outputClaim**: "Promotion code not found."
## SetClaimsIfRegexMatch Checks that a string claim `claimToMatch` and `matchTo` input parameter are equal, and sets the output claims with the value present in `outputClaimIfMatched` input parameter, along with compare result output claim, which is to be set as `true` or `false` based on the result of comparison.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | inputClaim | claimToMatch | string | The claim type, which is to be compared. | | InputParameter | matchTo | string | The regular expression to match. |
Checks that a string claim `claimToMatch` and `matchTo` input parameter are equa
| InputParameter | extractGroups | boolean | [Optional] Specifies whether the Regex match should extract groups values. Possible values: `true`, or `false` (default). | | OutputClaim | outputClaim | string | If regular expression is match, this output claim contains the value of `outputClaimIfMatched` input parameter. Or null, if no match. | | OutputClaim | regexCompareResultClaim | boolean | The regular expression match result output claim type, which is to be set as `true` or `false` based on the result of matching. |
-| OutputClaim| The name of the claim| string | If the extractGroups input parameter set to true, list of claim types that are produced after this claims transformation has been invoked. The name of the claimType must match the Regex group name. |
+| OutputClaim| The name of the claim| string | If the extractGroups input parameter set to true, list of claim types that are produced after this claims transformation has been invoked. The name of the claim must match the Regex group name. |
-### Example 1
+### Example of SetClaimsIfRegexMatch
Checks whether the provided phone number is valid, based on phone number regular expression pattern.
Checks whether the provided phone number is valid, based on phone number regular
``` - Input claims:
- - **claimToMatch**: "64854114520"
+ - **claimToMatch**: "64854114520"
- Input parameters:
- - **matchTo**: "^[0-9]{4,16}$"
- - **outputClaimIfMatched**: "isPhone"
+ - **matchTo**: "^[0-9]{4,16}$"
+ - **outputClaimIfMatched**: "isPhone"
- Output claims:
- - **outputClaim**: "isPhone"
- - **regexCompareResultClaim**: true
+ - **outputClaim**: "isPhone"
+ - **regexCompareResultClaim**: true
-### Example 2
+### Example of SetClaimsIfRegexMatch with extract groups
Checks whether the provided email address is valid, and return the email alias.
Checks whether the provided email address is valid, and return the email alias.
``` - Input claims:
- - **claimToMatch**: "emily@contoso.com"
+ - **claimToMatch**: "emily@contoso.com"
- Input parameters:
- - **matchTo**: `(?&lt;mailAlias&gt;.*)@(.*)$`
- - **outputClaimIfMatched**: "isEmail"
- - **extractGroups**: true
+ - **matchTo**: `(?&lt;mailAlias&gt;.*)@(.*)$`
+ - **outputClaimIfMatched**: "isEmail"
+ - **extractGroups**: true
- Output claims:
- - **outputClaim**: "isEmail"
- - **regexCompareResultClaim**: true
- - **mailAlias**: emily
-
+ - **outputClaim**: "isEmail"
+ - **regexCompareResultClaim**: true
+ - **mailAlias**: emily
+ ## SetClaimsIfStringsAreEqual Checks that a string claim and `matchTo` input parameter are equal, and sets the output claims with the value present in `stringMatchMsg` and `stringMatchMsgCode` input parameters, along with compare result output claim, which is to be set as `true` or `false` based on the result of comparison.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim | string | The claim type, which is to be compared. | | InputParameter | matchTo | string | The string to be compared with `inputClaim`. |
Checks that a string claim and `matchTo` input parameter are equal, and sets the
| OutputClaim | outputClaim2 | string | If strings are equals, this output claim contains the value of `stringMatchMsgCode` input parameter. | | OutputClaim | stringCompareResultClaim | boolean | The compare result output claim type, which is to be set as `true` or `false` based on the result of comparison. |
+### Example of SetClaimsIfStringsAreEqual
+ You can use this claims transformation to check if a claim is equal to value you specified. For example, the following claims transformation checks if the value of the **termsOfUseConsentVersion** claim is equal to `v1`. If yes, change the value to `v2`. ```xml
You can use this claims transformation to check if a claim is equal to value you
<InputParameters> <InputParameter Id="matchTo" DataType="string" Value="v1" /> <InputParameter Id="stringComparison" DataType="string" Value="ordinalIgnoreCase" />
- <InputParameter Id="stringMatchMsg" DataType="string" Value="B2C_V1_90005" />
- <InputParameter Id="stringMatchMsgCode" DataType="string" Value="The TOS is upgraded to v2" />
+ <InputParameter Id="stringMatchMsgCode" DataType="string" Value="B2C_V1_90005" />
+ <InputParameter Id="stringMatchMsg" DataType="string" Value="The TOS is upgraded to v2" />
</InputParameters> <OutputClaims> <OutputClaim ClaimTypeReferenceId="termsOfUseConsentVersion" TransformationClaimType="outputClaim1" />
You can use this claims transformation to check if a claim is equal to value you
</OutputClaims> </ClaimsTransformation> ```
-### Example
- Input claims:
- - **inputClaim**: v1
+ - **inputClaim**: v1
- Input parameters:
- - **matchTo**: V1
- - **stringComparison**: ordinalIgnoreCase
- - **stringMatchMsg**: B2C_V1_90005
- - **stringMatchMsgCode**: The TOS is upgraded to v2
+ - **matchTo**: V1
+ - **stringComparison**: ordinalIgnoreCase
+ - **stringMatchMsgCode**: B2C_V1_90005
+ - **stringMatchMsg**: The TOS is upgraded to v2
- Output claims:
- - **outputClaim1**: B2C_V1_90005
- - **outputClaim2**: The TOS is upgraded to v2
- - **stringCompareResultClaim**: true
+ - **outputClaim1**: B2C_V1_90005
+ - **outputClaim2**: The TOS is upgraded to v2
+ - **stringCompareResultClaim**: true
## SetClaimsIfStringsMatch Checks that a string claim and `matchTo` input parameter are equal, and sets the output claims with the value present in `outputClaimIfMatched` input parameter, along with compare result output claim, which is to be set as `true` or `false` based on the result of comparison.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | claimToMatch | string | The claim type, which is to be compared. | | InputParameter | matchTo | string | The string to be compared with inputClaim. |
Checks that a string claim and `matchTo` input parameter are equal, and sets the
| OutputClaim | outputClaim | string | If strings are equals, this output claim contains the value of `outputClaimIfMatched` input parameter. Or null, if the strings aren't match. | | OutputClaim | stringCompareResultClaim | boolean | The compare result output claim type, which is to be set as `true` or `false` based on the result of comparison. |
+### Example of SetClaimsIfStringsMatch
+ For example, the following claims transformation checks if the value of **ageGroup** claim is equal to `Minor`. If yes, return the value to `B2C_V1_90001`. ```xml
For example, the following claims transformation checks if the value of **ageGro
</ClaimsTransformation> ```
-### Example
- - Input claims:
- - **claimToMatch**: Minor
+ - **claimToMatch**: Minor
- Input parameters:
- - **matchTo**: Minor
- - **stringComparison**: ordinalIgnoreCase
- - **outputClaimIfMatched**: B2C_V1_90001
+ - **matchTo**: Minor
+ - **stringComparison**: ordinalIgnoreCase
+ - **outputClaimIfMatched**: B2C_V1_90001
- Output claims:
- - **isMinorResponseCode**: true
- - **isMinor**: B2C_V1_90001
-
+ - **isMinorResponseCode**: true
+ - **isMinor**: B2C_V1_90001
## StringContains
-Determine whether a specified substring occurs within the input claim. The result is a new boolean ClaimType with a value of `true` or `false`. `true` if the value parameter occurs within this string, otherwise, `false`.
+Determines whether a specified substring occurs within the input claim. The result is a new boolean claim with a value of `true` or `false`. `true` if the value parameter occurs within this string, otherwise, `false`.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim | string | The claim type, which is to be searched. | |InputParameter|contains|string|The value to search.| |InputParameter|ignoreCase|string|Specifies whether this comparison should ignore the case of the string being compared.|
-| OutputClaim | outputClaim | string | The ClaimType that is produced after this ClaimsTransformation has been invoked. A boolean indicator if the substring occurs within the input claim. |
+| OutputClaim | outputClaim | string | The claim that is produced after this claims transformation has been invoked. A boolean indicator if the substring occurs within the input claim. |
+
+### Example of StringContains
Use this claims transformation to check if a string claim type contains a substring. Following example, checks whether the `roles` string claim type contains the value of **admin**.
Use this claims transformation to check if a string claim type contains a substr
</ClaimsTransformation> ```
-### Example
- - Input claims:
- - **inputClaim**: "Admin, Approver, Editor"
+ - **inputClaim**: "Admin, Approver, Editor"
- Input parameters:
- - **contains**: "admin,"
- - **ignoreCase**: true
+ - **contains**: "admin,"
+ - **ignoreCase**: true
- Output claims:
- - **outputClaim**: true
+ - **outputClaim**: true
## StringSubstring Extracts parts of a string claim type, beginning at the character at the specified position, and returns the specified number of characters.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim | string | The claim type, which contains the string. | | InputParameter | startIndex | int | The zero-based starting character position of a substring in this instance. | | InputParameter | length | int | The number of characters in the substring. | | OutputClaim | outputClaim | boolean | A string that is equivalent to the substring of length that begins at startIndex in this instance, or Empty if startIndex is equal to the length of this instance and length is zero. |
-For example, get the phone number country/region prefix.
+### Example of StringSubstring
+For example, get the phone number country/region prefix.
```xml <ClaimsTransformation Id="GetPhonePrefix" TransformationMethod="StringSubstring">
For example, get the phone number country/region prefix.
</OutputClaims> </ClaimsTransformation> ```
-### Example
- Input claims:
- - **inputClaim**: "+1644114520"
+ - **inputClaim**: "+1644114520"
- Input parameters:
- - **startIndex**: 0
- - **length**: 2
+ - **startIndex**: 0
+ - **length**: 2
- Output claims:
- - **outputClaim**: "+1"
+ - **outputClaim**: "+1"
## StringReplace Searches a claim type string for a specified value, and returns a new claim type string in which all occurrences of a specified string in the current string are replaced with another specified string.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim | string | The claim type, which contains the string. | | InputParameter | oldValue | string | The string to be searched. | | InputParameter | newValue | string | The string to replace all occurrences of `oldValue` | | OutputClaim | outputClaim | boolean | A string that is equivalent to the current string except that all instances of oldValue are replaced with newValue. If oldValue is not found in the current instance, the method returns the current instance unchanged. |
-For example, normalize a phone number, by removing the `-` characters
+### Example of StringReplace
+For example, normalize a phone number, by removing the `-` characters
```xml <ClaimsTransformation Id="NormalizePhoneNumber" TransformationMethod="StringReplace">
For example, normalize a phone number, by removing the `-` characters
</OutputClaims> </ClaimsTransformation> ```
-### Example
+ - Input claims:
- - **inputClaim**: "+164-411-452-054"
+ - **inputClaim**: "+164-411-452-054"
- Input parameters:
- - **oldValue**: "-"
- - **newValue**: ""
+ - **oldValue**: "-"
+ - **newValue**: ""
- Output claims:
- - **outputClaim**: "+164411452054"
+ - **outputClaim**: "+164411452054"
## StringJoin Concatenates the elements of a specified string collection claim type, using the specified separator between each element or member.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim | stringCollection | A collection that contains the strings to concatenate. | | InputParameter | delimiter | string | The string to use as a separator, such as comma `,`. | | OutputClaim | outputClaim | string | A string that consists of the members of the `inputClaim` string collection, delimited by the `delimiter` input parameter. |
+### Example of StringJoin
+ The following example takes a string collection of user roles, and converts it to a comma delimiter string. You can use this method to store a string collection in Azure AD user account. Later, when you read the account from the directory, use the `StringSplit` to convert the comma delimiter string back to string collection. ```xml
The following example takes a string collection of user roles, and converts it t
</ClaimsTransformation> ```
-### Example
- - Input claims: - **inputClaim**: `[ "Admin", "Author", "Reader" ]` - Input parameters:
The following example takes a string collection of user roles, and converts it t
- Output claims: - **outputClaim**: `"Admin,Author,Reader"` - ## StringSplit Returns a string array that contains the substrings in this instance that are delimited by elements of a specified string.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | inputClaim | string | A string claim type that contains the sub strings to split. | | InputParameter | delimiter | string | The string to use as a separator, such as comma `,`. | | OutputClaim | outputClaim | stringCollection | A string collection whose elements contain the substrings in this string that are delimited by the `delimiter` input parameter. |
+### Example of StringSplit
+ The following example takes a comma delimiter string of user roles, and converts it to a string collection. ```xml
The following example takes a comma delimiter string of user roles, and converts
</ClaimsTransformation> ```
-### Example
- - Input claims:
- - **inputClaim**: "Admin,Author,Reader"
+ - **inputClaim**: `Admin,Author,Reader`
- Input parameters: - **delimiter**: "," - Output claims:
- - **outputClaim**: [ "Admin", "Author", "Reader" ]
+ - **outputClaim**: `[ "Admin", "Author", "Reader" ]`
## String claim transformations expressions+ Claim transformations expressions in Azure AD B2C custom policies provide context information about the tenant ID and technical profile ID. | Expression | Description | Example |
Claim transformations expressions in Azure AD B2C custom policies provide contex
| `{TechnicalProfileId}` | The technical profileId name. | Facebook-OAUTH | | `{RelyingPartyTenantId}` | The tenant ID of the relying party policy. | your-tenant.onmicrosoft.com | | `{TrustFrameworkTenantId}` | The tenant ID of the trust framework. | your-tenant.onmicrosoft.com |+
+## Next steps
+
+- Find more [claims transformation samples](https://github.com/azure-ad-b2c/unit-tests/tree/main/claims-transformation) on the Azure AD B2C community GitHub repo
active-directory-b2c Stringcollection Transformations https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/active-directory-b2c/stringcollection-transformations.md
Previously updated : 03/04/2021 Last updated : 01/17/2022 # StringCollection claims transformations -
-This article provides examples for using the string collection claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [ClaimsTransformations](claimstransformations.md).
+This article provides examples for using the string collection claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [claims transformations](claimstransformations.md).
## AddItemToStringCollection Adds a string claim to a new unique values stringCollection claim.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | item | string | The ClaimType to be added to the output claim. |
+| InputClaim | Element | string | The ClaimType to be added to the output claim. |
| InputClaim | collection | stringCollection | The string collection to be added to the output claim. If the collection contains items, the claims transformation copies the items, and adds the item to the end of the output collection claim. | | OutputClaim | collection | stringCollection | The ClaimType that is produced after this claims transformation has been invoked, with the value specified in the input claim. | Use this claims transformation to add a string to a new or existing stringCollection. It's commonly used in a **AAD-UserWriteUsingAlternativeSecurityId** technical profile. Before a new social account is created, **CreateOtherMailsFromEmail** claims transformation reads the ClaimType and adds the value to the **otherMails** ClaimType.
+### Example of AddItemToStringCollection
+ The following claims transformation adds the **email** ClaimType to **otherMails** ClaimType. ```xml
The following claims transformation adds the **email** ClaimType to **otherMails
</ClaimsTransformation> ```
-### Example
- - Input claims: - **collection**: ["someone@outlook.com"] - **item**: "admin@contoso.com"
The following claims transformation adds the **email** ClaimType to **otherMails
Adds a string parameter to a new unique values stringCollection claim.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | collection | stringCollection | The string collection to be added to the output claim. If the collection contains items, the claims transformation copies the items, and adds the item to the end of the output collection claim. |
-| InputParameter | item | string | The value to be added to the output claim. |
+| InputParameter | Element | string | The value to be added to the output claim. |
| OutputClaim | collection | stringCollection | The ClaimType that is produced after this claims transformation has been invoked, with the value specified in the input parameter. |
-Use this claims transformation to add a string value to a new or existing stringCollection. The following example adds a constant email address (admin@contoso.com) to the **otherMails** claim.
+### Example of AddParameterToStringCollection
+
+The following example adds a constant email address (admin@contoso.com) to the **otherMails** claim.
```xml <ClaimsTransformation Id="SetCompanyEmail" TransformationMethod="AddParameterToStringCollection">
Use this claims transformation to add a string value to a new or existing string
</ClaimsTransformation> ```
-### Example
- - Input claims: - **collection**: ["someone@outlook.com"] - Input parameters
Use this claims transformation to add a string value to a new or existing string
Gets the first item from the provided string collection.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- | | InputClaim | collection | stringCollection | The ClaimTypes that are used by the claims transformation to get the item. | | OutputClaim | extractedItem | string | The ClaimTypes that are produced after this ClaimsTransformation has been invoked. The first item in the collection. |
-The following example reads the **otherMails** claim and return the first item into the **email** claim.
+### Example of GetSingleItemFromStringCollection
+
+The following example reads the **otherMails** claim and returns the first item into the **email** claim.
```xml <ClaimsTransformation Id="CreateEmailFromOtherMails" TransformationMethod="GetSingleItemFromStringCollection">
The following example reads the **otherMails** claim and return the first item i
</ClaimsTransformation> ```
-### Example
- - Input claims: - **collection**: ["someone@outlook.com", "someone@contoso.com"] - Output claims:
The following example reads the **otherMails** claim and return the first item i
Checks if a StringCollection claim type contains an element.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | inputClaim | stringCollection | The claim type which is to be searched. |
+| InputClaim | inputClaim | stringCollection | The claim to be searched. |
|InputParameter|item|string|The value to search.| |InputParameter|ignoreCase|string|Specifies whether this comparison should ignore the case of the strings being compared.| | OutputClaim | outputClaim | boolean | The ClaimType that is produced after this ClaimsTransformation has been invoked. A boolean indicator if the collection contains such a string |
+### Example of StringCollectionContains
+ Following example checks whether the `roles` stringCollection claim type contains the value of **admin**. ```xml
Following example checks whether the `roles` stringCollection claim type contain
``` - Input claims:
- - **inputClaim**: ["reader", "author", "admin"]
+ - **inputClaim**: ["reader", "author", "admin"]
- Input parameters:
- - **item**: "Admin"
- - **ignoreCase**: "true"
+ - **item**: "Admin"
+ - **ignoreCase**: "true"
- Output claims:
- - **outputClaim**: "true"
+ - **outputClaim**: "true"
## StringCollectionContainsClaim Checks if a StringCollection claim type contains a claim value.
-| Item | TransformationClaimType | Data Type | Notes |
+| Element | TransformationClaimType | Data Type | Notes |
| - | -- | | -- |
-| InputClaim | collection | stringCollection | The claim type which is to be searched. |
+| InputClaim | collection | stringCollection | The claim to be searched. |
| InputClaim | item|string| The claim type that contains the value to search.| |InputParameter|ignoreCase|string|Specifies whether this comparison should ignore the case of the strings being compared.| | OutputClaim | outputClaim | boolean | The ClaimType that is produced after this ClaimsTransformation has been invoked. A boolean indicator if the collection contains such a string |
+### Example of StringCollectionContainsClaim
+ Following example checks whether the `roles` stringCollection claim type contains the value of the `role` claim type. ```xml
Following example checks whether the `roles` stringCollection claim type contain
``` - Input claims:
- - **collection**: ["reader", "author", "admin"]
- - **item**: "Admin"
+ - **collection**: ["reader", "author", "admin"]
+ - **item**: "Admin"
- Input parameters:
- - **ignoreCase**: "true"
+ - **ignoreCase**: "true"
- Output claims:
- - **outputClaim**: "true"
+ - **outputClaim**: "true"
+
+## Next steps
+
+- Find more [claims transformation samples](https://github.com/azure-ad-b2c/unit-tests/tree/main/claims-transformation) on the Azure AD B2C community GitHub repo
api-management Transform Api https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/api-management/transform-api.md
description: In this tutorial, you learn how to protect your API in API Manageme
-+ Previously updated : 09/28/2020 Last updated : 12/22/2021 # Tutorial: Transform and protect your API
-The tutorial shows how to transform your API so it does not reveal info about the private backend. For example, you might want to hide the info about the technology stack that is running on the backend. You might also want to hide original URLs that appear in the body of the API's HTTP response and instead redirect them to the APIM gateway.
+In this tutorial, you'll learn how to transform your API so it doesn't reveal private backend info. Transforming an API might help you hide the technology stack info that's running in the backend. It also helps you hide the original URLs that appear in the body of the API's HTTP response.
-This tutorial also shows you how easy it is to add protection for your backend API by configuring a rate limit with Azure API Management. For example, you may want to limit the rate of API calls so the API isn't overused by developers. For more information, see [API Management policies](api-management-policies.md).
+The tutorial also explains how to add protection to your backend API by configuring a rate limit with Azure API Management. You might want to limit the rate of API calls so the API isn't overused by developers. For more information, see [API Management policies](api-management-policies.md).
In this tutorial, you learn how to: > [!div class="checklist"] >
-> - Transform an API to strip response headers
-> - Replace original URLs in the body of the API response with APIM gateway URLs
-> - Protect an API by adding a rate limit policy (throttling)
-> - Test the transformations
+> * Transform an API to strip response headers
+> * Replace original URLs in the body of the API response with API Management gateway URLs
+> * Protect an API by adding a rate limit policy (throttling)
+> * Test the transformations
## Prerequisites -- Learn the [Azure API Management terminology](api-management-terminology.md).-- Understand the [concept of policies in Azure API Management](api-management-howto-policies.md).-- Complete the following quickstart: [Create an Azure API Management instance](get-started-create-service-instance.md).-- Also, complete the following tutorial: [Import and publish your first API](import-and-publish.md).
+* Learn the [Azure API Management terminology](api-management-terminology.md).
+* Understand the [concept of policies in Azure API Management](api-management-howto-policies.md).
+* Complete the following quickstart: [Create an Azure API Management instance](get-started-create-service-instance.md).
+* Also, complete the following tutorial: [Import and publish your first API](import-and-publish.md).
[!INCLUDE [api-management-navigate-to-instance.md](../../includes/api-management-navigate-to-instance.md)] ## Transform an API to strip response headers
-This section shows how to hide the HTTP headers that you don't want to show to your users. This example shows how to delete the following headers in the HTTP response:
+This section shows how to hide the HTTP headers that you don't want to show to your users. For example, delete the following headers in the HTTP response:
-- **X-Powered-By**-- **X-AspNet-Version**
+* **X-Powered-By**
+* **X-AspNet-Version**
### Test the original response
To see the original response:
1. In your API Management service instance, select **APIs**. 1. Select **Demo Conference API** from your API list. 1. Select the **Test** tab, on the top of the screen.
-1. Select the **GetSpeakers** operation and select **Send**.
+1. Select the **GetSpeakers** operation, and then select **Send**.
-The original response should look similar to the following:
+The original API response should look similar to the following response:
As you can see, the response includes the **X-AspNet-Version** and **X-Powered-By** headers. ### Set the transformation policy 1. Select **Demo Conference API** > **Design** > **All operations**.
-4. In the **Outbound processing** section, select the code editor (**</>**) icon.
+1. In the **Outbound processing** section, select the code editor (**</>**) icon.
+
+ :::image type="content" source="media/transform-api/outbound-policy.png" alt-text="Navigate to outbound policy" border="false":::
+
+1. Position the cursor inside the **&lt;outbound&gt;** element, and then select **Show snippets** at the top-right corner of the screen.
- :::image type="content" source="media/transform-api/04-ProtectYourAPI-01-SetPolicy-Outbound.png" alt-text="Navigate to outbound policy" border="false":::
+ :::image type="content" source="media/transform-api/show-snippets.png" alt-text="Show snippets":::
-1. Position the cursor inside the **&lt;outbound&gt;** element and select **Show snippets** at the top right corner.
1. In the right window, under **Transformation policies**, select **Set HTTP header** twice (to insert two policy snippets).
- :::image type="content" source="media/transform-api/transform-api.png" alt-text="Set HTTP header policy":::
+ :::image type="content" source="media/transform-api/set-http-header.png" alt-text="Set HTTP header policy":::
-1. Modify your **\<outbound>** code to look like this:
+1. Modify your **\<outbound>** code to the following code:
``` <set-header name="X-Powered-By" exists-action="delete" />
As you can see, the response includes the **X-AspNet-Version** and **X-Powered-B
1. Select **Save**.
-## Replace original URLs in the body of the API response with APIM gateway URLs
+## Replace original URLs in the body of the API response with API Management gateway URLs
-This section shows how to hide original URLs that appear in the body of the API's HTTP response and instead redirect them to the APIM gateway.
+This section shows how to hide original URLs that appear in the body of the API's HTTP response and instead redirect them to the API Management gateway.
### Test the original response To see the original response: 1. Select **Demo Conference API** > **Test**.
-1. Select the **GetSpeakers** operation and select **Send**.
+1. Select the **GetSpeakers** operation, and then select **Send**.
As you can see, the response includes the original backend URLs: :::image type="content" source="media/transform-api/original-response2.png" alt-text="Original URLs in response"::: - ### Set the transformation policy
-1. Select **Demo Conference API** > **All operations** > **Design**.
-1. In the **Outbound processing** section, select the code editor (**</>**) icon.
-1. Position the cursor inside the **&lt;outbound&gt;** element and select **Show snippets** at the top right corner.
-1. In the right window, under **Transformation policies**, select **Mask URLs in content**.
-1. Select **Save**.
+1. Select **Demo Conference API** > **Design** > **All operations**.
+1. In the **Outbound processing** section, select the code editor (**</>**) icon.
+
+ :::image type="content" source="media/transform-api/outbound-policy.png" alt-text="Navigate to outbound policy" border="false":::
+
+1. Position the cursor inside the **&lt;outbound&gt;** element, and then select **Show snippets** at the top-right corner of the screen.
+
+ :::image type="content" source="media/transform-api/show-snippets-1.png" alt-text="Select show snippets":::
+
+1. In the right window, under **Transformation policies**, select **Mask URLs in content**.
+
+ :::image type="content" source="media/transform-api/mask-urls-new.png" alt-text="Mask URLs in content":::
+
+1. Select **Save**.
## Protect an API by adding rate limit policy (throttling)
-This section shows how to add protection for your backend API by configuring rate limits. For example, you may want to limit the rate of API calls so that the API isn't overused by developers. In this example, the limit is set to 3 calls per 15 seconds for each subscription ID. After 15 seconds, a developer can retry calling the API.
+This section shows how to add protection to your backend API by configuring rate limits. You might also want to limit the rate of API calls so that the API isn't overused by developers. In this example, the limit is set to three calls per 15 seconds for each subscription ID. After 15 seconds, a developer can retry calling an API.
+
+1. Select **Demo Conference API** > **Design** > **All operations**.
+1. In the **Inbound processing** section, select the code editor (**</>**) icon.
+
+ :::image type="content" source="media/transform-api/inbound-policy.png" alt-text="Navigate to inbound policy":::
+
+1. Position the cursor inside the **&lt;inbound&gt;** element, and then select **Show snippets** at the top-right corner of the screen.
+
+ :::image type="content" source="media/transform-api/show-snippets-2.png" alt-text="Set inbound policy" border="false":::
-1. Select **Demo Conference API** > **All operations** > **Design**.
-1. In the **Inbound processing** section, select the code editor (**</>**) icon.
-1. Position the cursor inside the **&lt;inbound&gt;** element and select **Show snippets** at the top right corner.
+1. In the right window, under **Access restriction policies**, select **Limit call rate per key**.
- :::image type="content" source="media/transform-api/04-ProtectYourAPI-01-SetPolicy-Inbound.png" alt-text="Set inbound policy" border="false":::
+ :::image type="content" source="media/transform-api/limit-call-rate-per-key.png" alt-text="Select limit call rate per key":::
-1. In the right window, under **Access restriction policies**, select **+ Limit call rate per key**.
-1. Modify your **rate-limit-by-key** code (in the **\<inbound\>** element) to the following code:
+1. Modify your **rate-limit-by-key** code in the **\<inbound\>** element to the following code:
``` <rate-limit-by-key calls="3" renewal-period="15" counter-key="@(context.Subscription.Id)" />
This section shows how to add protection for your backend API by configuring rat
## Test the transformations
-At this point, if you look at the code in the code editor, your policies look like this:
+At this point, if you look at the code in the code editor, your policies look like the following code:
``` <policies>
The rest of this section tests policy transformations that you set in this artic
As you can see, the headers have been stripped:
- :::image type="content" source="media/transform-api/final-response1.png" alt-text="Stripped response headers":::
+ :::image type="content" source="media/transform-api/stripped-response-headers.png" alt-text="Stripped response headers":::
### Test the replaced URL 1. Select **Demo Conference API** > **Test**. 1. Select the **GetSpeakers** operation and select **Send**.
- As you can see, the URL has been replaced.
+ As you can see, the URLs are replaced.
- :::image type="content" source="media/transform-api/final-response2.png" alt-text="Replaced URL":::
+ :::image type="content" source="media/transform-api/test-replaced-url.png" alt-text="Replaced URLs":::
### Test the rate limit (throttling) 1. Select **Demo Conference API** > **Test**. 1. Select the **GetSpeakers** operation. Select **Send** three times in a row.
- After sending the request 3 times, you get the **429 Too many requests** response.
+ After sending the request three times, you get the **429 Too Many Requests** response.
- :::image type="content" source="media/transform-api/test-throttling.png" alt-text="Too many requests":::
+ :::image type="content" source="media/transform-api/test-throttling-new.png" alt-text="Too many requests":::
-1. Wait 15 seconds or so and select **Send** again. This time you should get a **200 OK** response.
+1. Wait for 15 seconds or more and then select **Send** again. This time you should get a **200 OK** response.
## Next steps
In this tutorial, you learned how to:
> [!div class="checklist"] >
-> - Transform an API to strip response headers
-> - Replace original URLs in the body of the API response with APIM gateway URLs
-> - Protect an API by adding rate limit policy (throttling)
-> - Test the transformations
+> * Transform an API to strip response headers
+> * Replace original URLs in the body of the API response with API Management gateway URLs
+> * Protect an API by adding rate limit policy (throttling)
+> * Test the transformations
Advance to the next tutorial:
automation Whats New https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/automation/whats-new.md
Azure Automation receives improvements on an ongoing basis. To stay up to date w
This page is updated monthly, so revisit it regularly. If you're looking for items older than six months, you can find them in [Archive for What's new in Azure Automation](whats-new-archive.md). +
+## November 2021
+
+### General Availability of Managed Identity for Azure Automation
+
+**Type:** New feature
+
+Azure Automation now supports Managed Identities in Azure public, Azure Gov, and Azure China cloud. [System Assigned Managed Identities](/azure/automation/enable-managed-identity-for-automation) is supported for cloud as well as hybrid jobs, while [User Assigned Managed Identities](/azure/automation/automation-security-overview#managed-identities-preview) is supported only for cloud jobs. Read the [announcement](https://azure.microsoft.com/updates/azure-automation-managed-identities-ga/) for more information.
+
+### Preview support for PowerShell 7.1
+
+**Type:** New feature
+
+Azure Automation support for PowerShell 7.1 runbooks is available as public preview in Azure public, Azure Gov, and Azure China clouds. Read the [announcement](https://azure.microsoft.com/updates/azure-automation-powershell-7/) for more information.
+++ ## October 2021 ### Preview support for Hybrid Runbook Worker extension for Azure VMs and Arc-enabled servers
availability-zones Az Overview https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/availability-zones/az-overview.md
description: Learn about regions and availability zones and how they work to hel
Previously updated : 12/10/2021 Last updated : 1/17/2022
Datacenter locations are selected by using rigorous vulnerability risk assessmen
With availability zones, you can design and operate applications and databases that automatically transition between zones without interruption. Azure availability zones are highly available, fault tolerant, and more scalable than traditional single or multiple datacenter infrastructures.
-Each data center is assigned to a physical zone. Physical zones are mapped to logical zones in your Azure subscription. Azure subscriptions are automatically assigned this mapping at the time a subscription is created. You can use the dedicated ARM API called: [checkZonePeers](/rest/api/resources/subscriptions/check-zone-peers.md) to compare zone mapping for resilient solutions that span across multiple subscriptions.
+Each data center is assigned to a physical zone. Physical zones are mapped to logical zones in your Azure subscription. Azure subscriptions are automatically assigned this mapping at the time a subscription is created. You can use the dedicated ARM API called: [checkZonePeers](https://docs.microsoft.com/rest/api/resources/subscriptions/check-zone-peers) to compare zone mapping for resilient solutions that span across multiple subscriptions.
You can design resilient solutions by using Azure services that use availability zones. Co-locate your compute, storage, networking, and data resources across an availability zone, and replicate this arrangement in other availability zones.
azure-edge-hardware-center Azure Edge Hardware Center Contact Microsoft Support https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/azure-edge-hardware-center/azure-edge-hardware-center-contact-microsoft-support.md
+
+ Title: Log support ticket for Azure Edge Hardware Center orders
+description: Learn how to log support request for issues related to orders created via Azure Edge Hardware Center.
++++++ Last updated : 01/03/2022+++
+# Open a support ticket for Azure Edge Hardware Center
+
+This article applies to orders created by Azure Edge Hardware Center service. If you encounter any issues with your service, you can create a service request for technical support. This article walks you through:
+
+* How to create a support request.
+* How to manage a support request lifecycle from within the portal.
+
+## Create a support request
+
+Do the following steps to create a support request:
+
+1. Go to your Azure Edge Hardware Center order. Navigate to **Support + troubleshooting** section and then select **New support request**.
+
+1. In **New support request**, on the **Problem description** tab, take the following steps:
+
+ 1. From the **Issue type** dropdown list, select **Technical**.
+ 2. Choose your **Subscription**.
+ 3. Under **Service**, check **My Services**. From the dropdown list, select **Azure Edge Hardware Center**.
+ 4. Select your **Resource**. This corresponds to the name of your order.
+ 5. Give a brief **Summary** of the issue you are experiencing.
+ 6. Select your **Problem type**.
+ 7. Based on the problem type you selected, choose a corresponding **Problem subtype**.
+ 8. Select **Next**.
+
+ ![Screenshot showing the Problem description tab.](./media/azure-edge-hardware-center-contact-microsoft-support/log-support-request-1.png)
+
+1. On the **Recommended solution** tab, check if the fix for the issue that you are observing is documented. If the error you are facing is not documented, select **Next**.
+
+ ![Screenshot showing the Recommended solution tab.](./media/azure-edge-hardware-center-contact-microsoft-support/log-support-request-2.png)
+
+1. On the **Additional details** tab, take the following steps:
+
+ 1. Under Problem details, provide the start date and time for the problem.
+ 1. Select the **Subscription type**.
+ 1. Supply a **Additional details about the issue**.
+ 1. In the **File upload**, select the folder icon to browse any other files you want to upload.
+ 1. Under **Advanced diagnostic information**, check **Allow collection of advanced diagnostic information**.
+
+ ![Screenshot showing the Additional details tab 1.](./media/azure-edge-hardware-center-contact-microsoft-support/log-support-request-3.png)
+
+ 1. Under **Support method**, based on your subscription, a **Support plan** is automatically populated.
+ 1. From the dropdown list, select the **Severity**.
+ 1. Specify a **Preferred contact method**.
+ 1. **Your availability** are automatically selected based on your subscription plan.
+ 1. Provide the language you prefer for Support.
+ 1. Under **Contact info**, provide your name, email, phone, optional contact, country/region. Microsoft Support uses this information to reach out to you for further information, diagnosis, and resolution.
+ 1. Select **Next**.
+
+ ![Screenshot showing the Additional details tab 2.](./media/azure-edge-hardware-center-contact-microsoft-support/log-support-request-4.png)
+
+4. On the **Review + Create** tab, review the information related to Support ticket. Select **Create**.
+
+ ![Screenshot showing the Review + create tab.](./media/azure-edge-hardware-center-contact-microsoft-support/log-support-request-5.png)
+
+ After you create the Support ticket, a Support personnel will contact you as soon as possible to proceed with your request.
+
+## Manage a support request
+
+After creating a support ticket, you can manage the lifecycle of the ticket from within the portal.
+
+### To manage your support requests
+
+1. To get to the help and support page, navigate to **Help + support**.
+
+ ![Screenshot showing how to manage support requests.](./media/azure-edge-hardware-center-contact-microsoft-support/manage-support-request-1.png)
+
+2. A tabular listing of **Recent support requests** is displayed in **Help + support**.
+
+3. Select and click a support request. You can view the status and the details for this request. Click **+ New message** if you want to follow up on this request.
+
+## Next steps
+
+- [Troubleshoot issues related to Azure Edge Hardware Center orders](azure-edge-hardware-center-troubleshoot-order.md).
azure-edge-hardware-center Azure Edge Hardware Center Create Order https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/azure-edge-hardware-center/azure-edge-hardware-center-create-order.md
+
+ Title: Tutorial to create an order using Azure Edge Hardware Center
+description: The tutorial about creating an Azure Edge Hardware Center via the Azure portal.
++++++ Last updated : 01/03/2022+
+# Customer intent: As an IT admin, I need to understand how to create an order via the Azure Edge Hardware Center.
+
+# Tutorial: Create an Azure Edge Hardware Center
+
+Azure Edge Hardware Center service lets you explore and order a variety of hardware from the Azure hybrid portfolio including Azure Stack Edge devices. This tutorial describes how to create an order using the Azure Edge Hardware Center via the Azure portal.
++
+In this tutorial, you'll:
+
+> [!div class="checklist"]
+> * Review prerequisites
+> * Create an order
++
+## Prerequisites
+
+Before you begin:
+
+- Make sure that the `Microsoft.EdgeOrder` provider is registered. To create an order in the Azure Edge Hardware Center, the `Microsoft.EdgeOrder` provider should be registered against your subscription.
+
+ For information on how to register, go to [Register resource provider](../databox-online/azure-stack-edge-gpu-manage-access-power-connectivity-mode.md#register-resource-providers).
+
+- Make sure that all the other prerequisites related to the product that you are ordering are met. For example, if ordering Azure Stack Edge device, ensure that all the [Azure Stack Edge prerequisites](../databox-online/azure-stack-edge-gpu-deploy-prep.md#prerequisites) are completed.
++
+## Create an order
+
+When you place an order through the Azure Edge Hardware Center, you can order multiple devices, to be shipped to more than one address, and you can reuse ship to addresses from other orders.
+
+Ordering through Azure Edge Hardware Center will create an Azure resource that will contain all your order-related information. One resource each will be created for each of the units ordered. After you have placed an order for the device, you may need to create a management resource for the device.
++++
+## Next steps
+
+In this tutorial, you learned about topics such as:
+
+> [!div class="checklist"]
+> * Review prerequisites
+> * Create an order
+
+Learn more on how to [Manage Azure Edge Hardware Center orders](azure-edge-hardware-center-manage-order.md)
azure-edge-hardware-center Azure Edge Hardware Center Manage Order https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/azure-edge-hardware-center/azure-edge-hardware-center-manage-order.md
+
+ Title: Manage Azure Edge Hardware Center orders
+description: Describes how to use the Azure portal to manage orders created via Azure Edge Hardware Center.
++++++ Last updated : 01/03/2022++
+# Use the Azure portal to manage your Azure Edge Hardware Center orders
+
+This article describes how to manage the orders created by Azure Edge Hardware Center. You can use the Azure portal to track and cancel orders created via the Edge Hardware Center.
+
+In this article, you learn how to:
+
+> [!div class="checklist"]
+> * Track order
+> * Cancel order
+> * Return hardware
++
+## Track order
+
+Follow these steps in the Azure portal to track the order you created using the Edge Hardware Center.
+
+1. In the Azure portal, go to **All resources**. Filter by **Type == Azure Edge Hardware Center**. This should list all the orders created using the Edge Hardware Center. From the list of orders, select your order and go to the order resource.
+
+ ![Screenshot showing how to select order from list of Edge Hardware Center orders.](media/azure-edge-hardware-center-manage-order/select-order-1.png)
+
+2. In the selected order resource, go to **Overview**. In the right pane, you can view the status of the order. For example, here the order was delivered to the customer.
+
+ ![Screenshot showing how to view order status for the created Edge Hardware Center order.](media/azure-edge-hardware-center-manage-order/track-order-status-1.png)
+
+ You can see the tracking information for your order after the hardware is shipped.
+
+ ![Screenshot showing how to view tracking number after the hardware is shipped.](media/azure-edge-hardware-center-manage-order/track-order-status-2.png)
+
+## Cancel order
+
+Follow these steps in the Azure portal to track the order you created using the Edge Hardware Center.
+
+1. In the Azure portal, go to **All resources**. Filter by **Type == Azure Edge Hardware Center**. This should list all the orders created using the Edge Hardware Center. From the list of orders, select your order and go to the order resource.
+
+2. In the selected order resource, go to **Overview**. In the right pane, from the top command bar, select Cancel. You can only cancel an order after the order is created and before the order is confirmed. For example, here the **Cancel** is enabled when the order status is **Placed**.
+
+ ![Screenshot showing how to cancel an order from list of Edge Hardware Center orders.](media/azure-edge-hardware-center-manage-order/cancel-order-2.png)
+
+3. You see a notification that the order is being canceled. Once the order is canceled, the order status updates to **Canceled**.
+
+ ![Screenshot showing the order in Canceled state.](media/azure-edge-hardware-center-manage-order/cancel-order-3.png)
+
+ If your order item shows up as **Confirmed** and you need to cancel it for some reason, send an email to [Operations team](mailto:email@example.com) with your request.
+
+## Return hardware
+
+If you used the Azure Edge Hardware Center to order your hardware, follow these steps to initiate the return. The example here is for Azure Stack Edge device but a similar flow applies to returning other hardware as well.
++
+## Next steps
+
+- Review [Azure Edge Hardware Center FAQ](azure-edge-hardware-center-faq.yml).
azure-edge-hardware-center Azure Edge Hardware Center Overview https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/azure-edge-hardware-center/azure-edge-hardware-center-overview.md
+
+ Title: Azure Edge Hardware Center overview
+description: Describes Azure Edge Hardware Center - an Azure service that lets you order all Azure hardware and manage and track those orders
++++++ Last updated : 01/03/2022++
+# Customer intent: As an IT admin, I need to understand how I can discover and order all first party Azure hardware and manage and track those orders.
++
+# What is Azure Edge Hardware Center?
+
+Azure Edge Hardware Center is a new Azure service that lets you order a variety of hardware or devices from the Azure hybrid portfolio. You can also use this service to see and track all your order related information at one place. The first party hardware that you order can then be used to build and run hybrid apps across datacenters, edge locations, remote offices, and the cloud.
+
+## Benefits
+
+Edge Hardware Center offers the following benefits:
+
+- **Place bulk orders of hardware** - You can order multiple units of a particular type of device or hardware at once by putting a quantity while placing your order.
+- **Ship multiple devices or hardware to different locations at the same time** - You can now ship hardware to multiple locations (within one country/region) through just one order. Add multiple addresses in the ΓÇ£Shipping + QuantityΓÇ¥ tab to achieve this.
+- **Save addresses for future orders** - You can save your frequently used addresses while placing an order. For subsequent orders, you can then select a shipping address from your address book.
+- **Stay updated with your order status** - You can view the order status updates for each of the order items. You can also choose to get notified through email when your order moves to next stage. You can add one or more people in the notification list.
+
+<!--## Available hardware
+
+Use the Edge Hardware Center to browse through and order SKUs from the following product families:
+
+|Hardware |Configuration |
+|||
+| Azure Stack Edge Pro - GPU |Azure Stack Edge Pro - 1 GPU <br> Azure Stack Edge Pro - 2 GPU |
+| Azure Stack Edge Pro R<sup>1</sup> |Azure Stack Edge Pro R - single node <br> Azure Stack Edge Pro R - single node with UPS |
+| Azure Stack Edge Mini R<sup>2</sup> |One configuration, selected automatically. |
+
+<sup>1,2</sup> R denotes rugged SKUs targeted for defense applications.-->
+
+## Resource provider
+
+Edge Hardware Center has its own independent resource provider (RP). This RP creates the following resource type when you place an order: **Microsoft.EdgeOrder**.
+
+Before you use this RP to create orders, your Azure subscription must be registered for this RP. Registration configures your subscription to work with the Edge Hardware Center RP. To register with this RP, you must have an *owner* or *contributor* access to the subscription.
+
+For more information, see [Register with an Azure Resource Provider](../azure-resource-manager/management/resource-providers-and-types.md#register-resource-provider).
+
+### Create orders
+
+You can create an Edge Hardware Center order via the Azure portal or via the SDK. To create an order via Azure portal, see [Create an Edge Hardware Center order in the Azure portal](azure-edge-hardware-center-create-order.md).
+
+The independent Edge Hardware Center RP decouples the ordering process from that of the resource creation for the service that manages the device or the hardware. For example, you'll create an order for Azure Stack Edge using the Edge Hardware Center service. You'll then create a separate resource for Azure Stack Edge using the Azure Stack Edge service to manage and activate the device.
+
+For more information, see [Create an Azure Stack Edge resource after you place the order via the Edge Hardware Center](../databox-online/azure-stack-edge-gpu-deploy-prep.md?tabs=azure-edge-hardware-center#create-a-management-resource-for-each-device).
+
+### Track orders
+
+You can track the status of your order by going to the order item resource within Edge Hardware Center. For more information, see [Track the Edge Hardware Center order](azure-edge-hardware-center-manage-order.md#track-order).
+
+You can also [Cancel the order](azure-edge-hardware-center-manage-order.md#cancel-order) or [Return hardware](azure-edge-hardware-center-manage-order.md#return-hardware ) once you are done.
+
+You can also enable alerts to receive email notifications if the order status changes. The email notifications are enabled when the order is placed.
++
+<!--## Region availability
+
+The Edge Hardware Center service is available in East US, West Europe, and South East Asia for Azure public cloud. The orders created by Edge Hardware Center can also be used to deploy devices in Azure Government, Azure Government Secret, and Azure Government Top Secret.-->
+
+## Data residency
+
+Data residency norms apply for the orders created using the Edge Hardware Center service. When placing an order in Southeast Asia region, data related to your order resides only within Southeast Asia (Singapore) and is not replicated outside this region. Orders created in Southeast Asia region will not be resilient to region wide outages.
+
+For more information, see [Data residency for Azure Stack Edge](../databox-online/azure-stack-edge-gpu-data-residency.md#azure-edge-hardware-center-ordering-and-management-resource).
++
+## Billing and pricing
+
+You will be billed against the resource from where you have placed the order. If you place the order through the Edge Hardware Center, your bill is reflected against the resource created in the process. For each order item resource that you create, you are billed for the respective hardware unit.
+
+For specific information on pricing for the orders you created, go to the pricing page for the corresponding product. For Azure Stack Edge, see [Azure Stack Edge Pricing](https://azure.microsoft.com/pricing/details/azure-stack/edge/).
++
+## Next steps
+
+Learn how to:
+
+- [Create an Azure Edge Hardware Center order](azure-edge-hardware-center-create-order.md).
+- [Manage Azure Edge Hardware Center orders](azure-edge-hardware-center-manage-order.md).
+- [Troubleshoot ordering issues with Azure Edge Hardware Center](azure-edge-hardware-center-troubleshoot-order.md).
azure-edge-hardware-center Azure Edge Hardware Center Resource Move Subscription Resource Group https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/azure-edge-hardware-center/azure-edge-hardware-center-resource-move-subscription-resource-group.md
+
+ Title: Move Azure Edge Hardware Center resource across subscriptions, resource groups
+description: Use the Azure portal to move an Azure Edge Hardware Center resource to another subscription or a resource group.
++++++ Last updated : 01/03/2022+++
+# Move Azure Edge Hardware Center resource across Azure subscriptions and resource groups via the Azure portal
+
+This article explains how to move an Azure Edge Hardware Center resource across Azure subscriptions, or to another resource group in the same subscription using the Azure portal.
+
+Both the source group and the target group are locked during the move operation. Write and delete operations are blocked on the resource groups until the move completes. This lock means you can't add, update, or delete resources in the resource groups. It doesn't mean the resources are frozen. <!--For example, if you move a SQL Server and its database to a new resource group, an application that uses the database experiences no downtime. It can still read and write to the database.--> The lock can last for a maximum of four hours, but most moves complete in much less time.
+
+Moving a resource only moves it to a new resource group or subscription. It doesn't change the location of the resource.
+
+<!--## Supported regions
+
+All the Azure public regions where you can create an Azure Edge Hardware Center order resource. For more information, see [Region availability for Edge Hardware Center](azure-edge-hardware-center-overview.md#region-availability). -->
+
+## Prerequisites
+
+Before you begin:
+
+- If moving your resource to a different subscription:
+
+ - Make sure that both the source and destinations subscriptions are active.
+ - Make sure that both the source and resource subscriptions exist within the same Azure Active Directory tenant.
+ - The destination subscription must be registered to the `Microsoft.EdgeOrder` resource provider. If not, you receive an error stating that the subscription is not registered for a resource type. You might see this error when moving a resource to a new subscription, but that subscription has never been used with that resource type.
+- If moving your resource to a different resource group, make sure that the account moving the resources must have at least the following permissions:
+
+ - *Microsoft.Resources/subscriptions/resourceGroups/moveResources/action* on the source resource group.
+ - *Microsoft.Resources/subscriptions/resourceGroups/write* on the destination resource group.
++
+## Move resource group or subscription
+
+1. In the Azure portal, go to the Azure Edge Hardware Center resource that you want to move. The Azure Edge Hardware Center resource in this example is created for an Azure Stack Edge order.
+
+ - To move to another subscription, select the option available for **Resource group (Move)**.
+ - To move to another resource group within the same subscription, select the option available for **Subscription ID (Move)**. <!--is activated against a device and storage accounts are created. It is however not required to activate the device and you can move an unregistered resource as well.-->
+
+ ![Screenshot showing Overview pane for the resource that will move.](media/azure-edge-hardware-center-move-subscription-resource-group/move-resource-group-1.png)
+
+1. On the **Source + target** tab, specify the destination Resource group in the same subscription. The source resource group is automatically set. If you are moving to a new subscription, also specify the subscription. Select **Next**.
+
+ ![Screenshot showing how to select Move option to move to a different resource group.](media/azure-edge-hardware-center-move-subscription-resource-group/move-resource-group-2.png)
+
+1. On the **Resources to move** tab, Edge Hardware Center service will determine if the resource move is allowed. As the validation begins, the validation status is shown as **Pending validation**. Wait for the validation to complete.
+
+ ![Validation pending to move the resource group in the same subscription.](media/azure-edge-hardware-center-move-subscription-resource-group/move-resource-group-3.png)
+
+ After the validation is complete and if the service determines that the resource move is allowed, validation status updates to **Succeeded**.
+
+ ![Screenshot showing validation succeeded to move the resource group in the same subscription.](media/azure-edge-hardware-center-move-subscription-resource-group/move-resource-group-4.png)
+
+ Select **Next**.
+
+1. On the **Review** tab, verify the **Selection summary** and select the checkbox to acknowledge that tools and scripts will need to be updated when moving to another resource group. To start moving the resources, select **Move**.
+
+ ![Screenshot showing how to acknowledge the impact of moving to another resource group in the same subscription on Review tab.](media/azure-edge-hardware-center-move-subscription-resource-group/move-resource-group-5.png)
++
+1. Check the notification in the Azure portal to verify that the resource move has completed.
+
+ ![Screenshot showing the notification indicating that the resource was successfully moved to a specified resource group. ](media/azure-edge-hardware-center-move-subscription-resource-group/move-resource-group-7.png)
++
+## Verify migration
+
+Follow these steps to verify that the resource was successfully moved to the specified subscription or resource group.
+
+- If you moved across subscriptions, go to the target subscription to see the moved resource. Go to **All resources** and filter against the target subscription to which you moved your resource.
+
+ ![Screenshot showing how to filter the list of all resources against the target subscription for the move. ](media/azure-edge-hardware-center-move-subscription-resource-group/move-resource-group-8.png)
+
+ <!--The shares, storage accounts associated with the resource should also be present with the moved resource.-->
+
+- If you moved to another resource group in the same subscription, go to the target resource group to see the moved resource. Go to **All resources** and filter against the target resource group to which you moved your resource.
+
+ ![Screenshot showing how to filter the list of all subscription against the target subscription for the move. ](media/azure-edge-hardware-center-move-subscription-resource-group/move-resource-group-8.png)
+
+ <!--The shares, storage accounts associated with the resource should also be present with the moved resource.-->
+
+## Clean up
+
+After the Azure Edge Hardware Center resource has moved, you can clean up the source resources that aren't needed.
+
+If you moved to another resource group, you can delete the source resource group. To do so:
+1. On the Azure portal dashboard, select the source resource group.
+1. At the top of the pane, select **Delete**.
+
+## Next steps
+
+In this article, you moved an Azure Edge Hardware Center resource from one subscription or resource group to another by using the Azure portal and then cleaned up the source resources that aren't needed. To learn more about moving resources in Azure, see:
+
+- [Move resources to a new resource group or subscription](../azure-resource-manager/management/move-resource-group-and-subscription.md)
azure-edge-hardware-center Azure Edge Hardware Center Troubleshoot Order https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/azure-edge-hardware-center/azure-edge-hardware-center-troubleshoot-order.md
+
+ Title: Troubleshoot Azure Edge Hardware Center issues via the Azure portal
+description: Describes how to troubleshoot Azure Edge Hardware Center ordering issues.
++++++ Last updated : 01/03/2022++
+# Troubleshoot your Azure Edge Hardware Center ordering issues
+
+This article describes how to troubleshoot Azure Edge Hardware Center ordering issues.
+
+## Unsupported subscription or region
+
+**Error Description:** In Azure portal, you get this error:
+
+*Selected subscription or region is not supported. Choose a different subscription or region.*
+
+**Suggested solution:** Make sure that you used a supported subscription such as [Microsoft Enterprise Agreement (EA)](https://azure.microsoft.com/overview/sales-number/), [Cloud Solution Provider (CSP)](/partner-center/azure-plan-lp), or [Microsoft Azure Sponsorship](https://azure.microsoft.com/offers/ms-azr-0036p/). Pay-as-you-go subscriptions aren't supported. For more information, see [Azure Edge Hardware Center resource prerequisites](azure-edge-hardware-center-create-order.md#prerequisites).
+
+There's the possibility that Microsoft may allow a subscription type upgrade on a case-by-case basis. Contact [Microsoft support](https://azure.microsoft.com/support/options/) so that they can understand your needs and adjust these limits appropriately.
+
+## Resource provider not registered for subscription
+
+**Error:** In Azure portal, you select a subscription to create Edge Hardware Center order and get the following error:
+
+*Resource provider(s): Microsoft.EdgeOrder are not registered for subscription &lt;subscription name&gt; and you don't have permissions to register a resource provider for subscription &lt;subscription name&gt;*.
+
+**Suggested solution:** Elevate your subscription access or find someone with owner or contributor access to register the resource provider.
+
+## Resource disallowed by policy
+
+**Error:** In Azure portal, you attempt to register a resource provider and get the following error:
+
+*Resource &lt;resource name&gt; was disallowed by policy. (Code: RequestDisallowedByPolicy). Initiative: Deny generally unwanted Resource Types. Policy: Not allowed resource types.*
+
+**Suggested solution:** This error occurs due to an existing Azure Policy assignment that blocks the resource creation. Azure Policy definitions and assignments are set by an organization's system administrator to ensure compliance while using or creating Azure resources. If any such policy assignment is blocking Azure Edge Hardware Center resource creation, contact your system administrator to edit your Azure Policy definition.
+
+## Selected subscription type not supported
+
+You will see this error when placing orders for Azure Stack Edge devices.
+
+**Error:** You have an EA, CSP, or sponsored subscription and you get the following error:
+
+* The selected subscription type is not supported. Make sure that you use a supported subscription. [Learn more](../databox-online/azure-stack-edge-deploy-prep.md#prerequisites).
+
+ If using a supported subscription type, make sure:
+
+- That the `Microsoft.EdgeOrder`provider is registered, when placing orders via the Azure Edge Hardware Center.
+
+For information on how to register, see [Register resource provider](../databox-online/azure-stack-edge-manage-access-power-connectivity-mode.md#register-resource-providers)*.
+
+**Suggested solution:** Follow these steps to register your Azure Edge Hardware Center resource provider:
+
+1. In Azure portal, go to **Home** > **Subscriptions**.
+
+2. Select the subscription that you'll use to order your device.
+
+3. Select **Resource providers** and then search for **Microsoft.EdgeOrder**.
+
+ If you don't have owner or contributor access to register the resource provider, you see the following error: *The subscription &lt;subscription name&gt; doesn't have permissions to register the resource provider(s): Microsoft.EdgeOrder.*
+
+ For more information, see [Register resource providers](../databox-online/azure-stack-edge-manage-access-power-connectivity-mode.md#register-resource-providers).
+
+## Next steps
+
+* Learn how to [Manage Azure Edge Hardware Center order](azure-edge-hardware-center-manage-order.md).
azure-functions Functions Bindings Service Bus https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/azure-functions/functions-bindings-service-bus.md
When using service bus extension version 5.x and higher, the following global co
|||| |prefetchCount|0|Gets or sets the number of messages that the message receiver can simultaneously request.| |autoCompleteMessages|true|Determines whether or not to automatically complete messages after successful execution of the function and should be used in place of the `autoComplete` configuration setting.|
-|maxAutoLockRenewalDuration|00:05:00|This should be used in place of `maxAutoRenewDuration`|
+|maxAutoLockRenewalDuration|00:05:00|The maximum duration within which the message lock will be renewed automatically. This only applies for functions that receive a batch of messages.|
|maxConcurrentCalls|16|The maximum number of concurrent calls to the callback that the message pump should initiate per scaled instance. By default, the Functions runtime processes multiple messages concurrently.| |maxConcurrentSessions|8|The maximum number of sessions that can be handled concurrently per scaled instance.| |maxMessages|1000|The maximum number of messages that will be passed to each function call. This only applies for functions that receive a batch of messages.|
azure-monitor Alerts Smart Detections Migration https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/azure-monitor/alerts/alerts-smart-detections-migration.md
Instead of using the default action group, you select an existing action group t
### Migrate your smart detection using the Azure portal
-Apply the migration to one specific Application Insights resource at a time.
- To migrate smart detection in your resource, take the following steps: 1. Select **Smart detection** under the **Investigate** heading in your Application Insights resource left-side menu.
To migrate smart detection in your resource, take the following steps:
![Smart detection feed banner](media/alerts-smart-detections-migration/smart-detection-feed-banner.png)
-3. Select an action group to be configured for the new alert rules. You can choose between using the default action group (as explained above) or using one of your existing action groups.
+3. Check the option "Migrate all Application Insights resources in this subscription", or leave it unchecked if you want to migrate only the current resource you are in.
+ > [!NOTE]
+ > Checking this option will impact all **existing** Application Insights resources (that were not migrated yet). As long as the migration to alerts is in preview, new Application Insights resources will still be created with non-alerts smart detection.
++
-4. Select **Migrate** to start the migration process.
+4. Select an action group to be configured for the new alert rules. You can choose between using the default action group (as explained above) or using one of your existing action groups.
+
+5. Select **Migrate** to start the migration process.
![Smart detection migration dialog](media/alerts-smart-detections-migration/smart-detection-migration-dialog.png)
You can start the smart detection migration using the following Azure CLI comman
az rest --method POST --uri /subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/migrateFromSmartDetection?api-version=2021-01-01-preview --body @body.txt ```
-Where body.txt should include:
+For migrating a single Application Insights resource, body.txt should include:
```json {
Where body.txt should include:
"customActionGroupName" : "{actionGroupName}" } ```
+For migrating all the Application Insights resources in a subscription, body.txt should include:
+```json
+{
+ "scope": [
+ "/subscriptions/{subscriptionId} "
+ ],
+ "actionGroupCreationPolicy" : "{Auto/Custom}",
+ "customActionGroupName" : "{actionGroupName}"
+}
+```
**ActionGroupCreationPolicy** selects the policy for migrating the email settings in the smart detection rules into action groups. Allowed values are: - **'Auto'**, which uses the default action groups as described in this document
azure-sql Long Term Retention Overview https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/azure-sql/database/long-term-retention-overview.md
Last updated 07/13/2021
Many applications have regulatory, compliance, or other business purposes that require you to retain database backups beyond the 7-35 days provided by Azure SQL Database and Azure SQL Managed Instance [automatic backups](automated-backups-overview.md). By using the long-term retention (LTR) feature, you can store specified SQL Database and SQL Managed Instance full backups in Azure Blob storage with [configured redundancy](automated-backups-overview.md#backup-storage-redundancy) for up to 10 years. LTR backups can then be restored as a new database.
-Long-term retention can be enabled for Azure SQL Database, and is available in public preview for Azure SQL Managed Instance. This article provides a conceptual overview of long-term retention. To configure long-term retention, see [Configure Azure SQL Database LTR](long-term-backup-retention-configure.md) and [Configure Azure SQL Managed Instance LTR](../managed-instance/long-term-backup-retention-configure.md).
+Long-term retention can be enabled for Azure SQL Database and for Azure SQL Managed Instance. This article provides a conceptual overview of long-term retention. To configure long-term retention, see [Configure Azure SQL Database LTR](long-term-backup-retention-configure.md) and [Configure Azure SQL Managed Instance LTR](../managed-instance/long-term-backup-retention-configure.md).
> [!NOTE] > You can use SQL Agent jobs to schedule [copy-only database backups](/sql/relational-databases/backup-restore/copy-only-backups-sql-server) as an alternative to LTR beyond 35 days.
azure-sql Sql Database Vulnerability Assessment Rules Changelog https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/azure-sql/database/sql-database-vulnerability-assessment-rules-changelog.md
Previously updated : 06/16/2021 Last updated : 01/16/2022 # SQL Vulnerability assessment rules changelog This article details the changes made to the SQL Vulnerability Assessment service rules. Rules that are updated, removed, or added will be outlined below. For an updated list of SQL Vulnerability assessment rules, see [SQL Vulnerability Assessment rules](sql-database-vulnerability-assessment-rules.md).
+## January 2022
+
+|Rule ID |Rule Title |Change details |
+||||
+|VA1054 |Minimal set of principals should be members of fixed high impact database roles |Logic change |
+|VA1220 |Database communication using TDS should be protected through TLS |Logic change |
+|VA2120 |Features that may affect security should be disabled |Logic change |
+|VA2129 |Changes to signed modules should be authorized |Logic change |
+ ## June 2021 |Rule ID |Rule Title |Change details |
azure-sql Restore Geo Backup https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/azure-sql/managed-instance/scripts/restore-geo-backup.md
ms.devlang: PowerShell -+ Last updated 07/03/2019
backup Backup Azure Sql Automation https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/backup/backup-azure-sql-automation.md
Title: SQL DB in Azure VM backup & restore via PowerShell description: Back up and restore SQL Databases in Azure VMs using Azure Backup and PowerShell. Previously updated : 06/30/2021 Last updated : 01/17/2022 ms.assetid: 57854626-91f9-4677-b6a2-5d12b6a866e1 +++ # Back up and restore SQL databases in Azure VMs with PowerShell
Once backup has been enabled for a DB, you can also trigger an on-demand backup
```powershell $bkpItem = Get-AzRecoveryServicesBackupItem -BackupManagementType AzureWorkload -WorkloadType MSSQL -Name "<backup item name>" -VaultId $testVault.ID
-$endDate = (Get-Date).AddDays(60).ToUniversalTime()
+$endDate = (Get-Date).AddDays(45).ToUniversalTime()
Backup-AzRecoveryServicesBackupItem -Item $bkpItem -BackupType Full -EnableCompression -VaultId $testVault.ID -ExpiryDateTimeUTC $endDate ```
cognitive-services Custom Keyword Basics https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/custom-keyword-basics.md
Before you can use a custom keyword, you need to create a keyword using the [Cus
:::image type="content" source="media/custom-keyword/custom-kw-portal-choose-prons.png" alt-text="Screenshot that shows where you choose the correct pronunciations.":::
-1. Select a model type, then select **Create**. You can view a list of regions that support the **Advanced** model type in the [Keyword recognition region support](keyword-recognition-region-support.md) documentation.
+1. Select a model type, then select **Create**. You can view a list of regions that support the **Advanced** model type in the [Keyword recognition region support](regions.md#keyword-recognition) documentation.
1. It may take up to 30 minutes for the model to be generated. The keyword list will change from **Processing** to **Succeeded** when the model is complete.
cognitive-services How To Custom Speech Test And Train https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/how-to-custom-speech-test-and-train.md
The transcriptions for all WAV files are contained in a single plain-text file.
For example:
-<!-- The following example contains tabs. Don't accidentally convert these into spaces. -->
-
-```input
+```tsv
speech01.wav speech recognition is awesome speech02.wav the quick brown fox jumped all over the place speech03.wav the lazy dog was not amused
cognitive-services Keyword Recognition Overview https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/keyword-recognition-overview.md
Custom Keyword allows you to generate two types of on-device models for any keyw
| Advanced | Best suited for product integration purposes. Models are generated with adaptation of a common base model using simulated training data to improve accuracy characteristics. It can take up to 48 hours for models to be ready. | > [!NOTE]
-> You can view a list of regions that support the **Advanced** model type in the [Keyword recognition region support](keyword-recognition-region-support.md) documentation.
+> You can view a list of regions that support the **Advanced** model type in the [Keyword recognition region support](regions.md#keyword-recognition) documentation.
Neither model type requires you to upload training data. Custom Keyword fully handles data generation and model training.
cognitive-services Keyword Recognition Region Support https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/keyword-recognition-region-support.md
- Title: Keyword recognition region support - Speech service-
-description: An overview of the Azure regions supported for keyword recognition.
------ Previously updated : 04/30/2021----
-# Keyword recognition region support
-
-| Region | Custom Keyword (Basic models) | Custom Keyword (Advanced models) | Keyword Verification |
-| | -- | -- | -- |
-| West US | Yes | No | Yes |
-| West US 2 | Yes | Yes | Yes |
-| East US | Yes | Yes | Yes |
-| East US 2 | Yes | Yes | Yes |
-| West Central US | Yes | No | Yes |
-| South Central US | Yes | Yes | Yes |
-| West Europe | Yes | Yes | Yes |
-| North Europe | Yes | Yes | Yes |
-| UK South | Yes | Yes | No |
-| East Asia | Yes | No | Yes |
-| Southeast Asia | Yes | Yes | Yes |
-| Central India | Yes | Yes | Yes |
-| Japan East | Yes | No | Yes |
-| Japan West | Yes | No | No |
-| Australia East | Yes | Yes | No |
-| Brazil South | Yes | No | No |
-| Canada Central | Yes | No | No |
-| Korea Central | Yes | No | No |
-| France Central | Yes | No | No |
-| North Central US | Yes | Yes | No |
-| Central US | Yes | No | No |
-| South Africa North | Yes | No | No |
cognitive-services Language Support https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/language-support.md
Both the Microsoft Speech SDK and the REST API support the following languages (
To improve accuracy, customization is available for some languages and baseline model versions by uploading **Audio + Human-labeled Transcripts**, **Plain Text**, **Structured Text**, and **Pronunciation**. By default, Plain Text customization is supported for all available baseline models. To learn more about customization, see [Get started with Custom Speech](./custom-speech-overview.md).
-<!--
-To get the AM and ML bits:
-https://westus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0/operations/GetSupportedLocalesForModels
-
-To get pronunciation bits:
-https://cris.ai -> Click on Adaptation Data -> scroll down to section "Pronunciation Datasets" -> Click on Import -> Locale: the list of locales there correspond to the supported locales
> | Language | Locale (BCP-47) | Customizations | |--|--|--|
cognitive-services Overview https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/overview.md
To add a Speech service resource (free or paid tier) to your Azure account:
- Choose either a free (F0) or paid (S0) pricing tier. For complete information about pricing and usage quotas for each tier, select **View full pricing details** or see [speech services pricing](https://azure.microsoft.com/pricing/details/cognitive-services/speech-services/). For limits on resources, see [Azure Cognitive Services Limits](../../azure-resource-manager/management/azure-subscription-service-limits.md#azure-cognitive-services-limits). - Create a new resource group for this Speech subscription or assign the subscription to an existing resource group. Resource groups help you keep your various Azure subscriptions organized. - Select **Create**. This will take you to the deployment overview and display deployment progress messages.
-<!--
-> [!NOTE]
-> You can create an unlimited number of standard-tier subscriptions in one or multiple regions. However, you can create only one free-tier subscription. Model deployments on the free tier that remain unused for 7 days will be decommissioned automatically.
>+ It takes a few moments to deploy your new Speech resource. ### Find keys and location/region
cognitive-services Regions https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/regions.md
Previously updated : 01/08/2022 Last updated : 01/16/2022
If you plan to train a custom model with audio data, use one of the [regions wit
### Intent recognition
-Available regions for **intent recognition** via the Speech SDK are the following:
+Available regions for **intent recognition** via the Speech SDK are in the following table.
| Global region | Region | Region identifier | | - | - | -- |
This is a subset of the publishing regions supported by the [Language Understand
### Voice assistants
-The [Speech SDK](speech-sdk.md) supports **voice assistant** capabilities through [Direct Line Speech](./direct-line-speech.md) in these regions:
+The [Speech SDK](speech-sdk.md) supports **voice assistant** capabilities through [Direct Line Speech](./direct-line-speech.md) for regions in the following table.
| Global region | Region | Region identifier | | - | - | -- |
The [Speech SDK](speech-sdk.md) supports **voice assistant** capabilities throug
### Speaker Recognition
-Available regions for **Speaker Recognition** are the following:
+Available regions for **Speaker Recognition** are in the following table.
| Geography | Region | Region identifier | | - | - | -- |
Available regions for **Speaker Recognition** are the following:
| Europe | West Europe | `westeurope` | | Europe | UK South | `uksouth` |
+### Keyword recognition
+
+Available regions for **Keyword recognition** are in the following table.
+
+| Region | Custom Keyword (Basic models) | Custom Keyword (Advanced models) | Keyword Verification |
+| | -- | -- | -- |
+| West US | Yes | No | Yes |
+| West US 2 | Yes | Yes | Yes |
+| East US | Yes | Yes | Yes |
+| East US 2 | Yes | Yes | Yes |
+| West Central US | Yes | No | Yes |
+| South Central US | Yes | Yes | Yes |
+| West Europe | Yes | Yes | Yes |
+| North Europe | Yes | Yes | Yes |
+| UK South | Yes | Yes | No |
+| East Asia | Yes | No | Yes |
+| Southeast Asia | Yes | Yes | Yes |
+| Central India | Yes | Yes | Yes |
+| Japan East | Yes | No | Yes |
+| Japan West | Yes | No | No |
+| Australia East | Yes | Yes | No |
+| Brazil South | Yes | No | No |
+| Canada Central | Yes | No | No |
+| Korea Central | Yes | No | No |
+| France Central | Yes | No | No |
+| North Central US | Yes | Yes | No |
+| Central US | Yes | No | No |
+| South Africa North | Yes | No | No |
+ ## REST APIs The Speech service also exposes REST endpoints for Speech-to-Text, Text-to-Speech and speaker recognition requests.
cognitive-services Speech Sdk https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/speech-sdk.md
Previously updated : 04/03/2020 Last updated : 01/16/2022
cognitive-services Speech Synthesis Markup https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/speech-synthesis-markup.md
Pitch changes can be applied at the sentence level.
| `format` | Provides additional information about the precise formatting of the element's text for content types that might have ambiguous formats. SSML defines formats for content types that use them (see table below). | Optional | | `detail` | Indicates the level of detail to be spoken. For example, this attribute might request that the speech synthesis engine pronounce punctuation marks. There are no standard values defined for `detail`. | Optional |
-<!-- I don't understand the last sentence. Don't we know which one Cortana uses? -->
- The following are the supported content types for the `interpret-as` and `format` attributes. Include the `format` attribute only if `interpret-as` is set to date and time. | interpret-as | format | Interpretation |
cognitive-services Speech To Text https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/speech-to-text.md
Previously updated : 09/01/2020 Last updated : 01/16/2022 keywords: speech to text, speech to text software
Speech-to-text, also known as speech recognition, enables real-time transcriptio
The speech-to-text service defaults to using the Universal language model. This model was trained using Microsoft-owned data and is deployed in the cloud. It's optimal for conversational and dictation scenarios. When using speech-to-text for recognition and transcription in a unique environment, you can create and train custom acoustic, language, and pronunciation models. Customization is helpful for addressing ambient noise or industry-specific vocabulary.
-This documentation contains the following article types:
-
-* **Quickstarts** are getting-started instructions to guide you through making requests to the service.
-* **How-to guides** contain instructions for using the service in more specific or customized ways.
-* **Concepts** provide in-depth explanations of the service functionality and features.
-* **Tutorials** are longer guides that show you how to use the service as a component in broader business solutions.
- > [!NOTE]
-> Bing Speech was decommissioned on October 15, 2019. If your applications, tools, or products are using the Bing Speech APIs, we've created guides to help you migrate to the Speech service.
-> - [Migrate from Bing Speech to the Speech service](how-to-migrate-from-bing-speech.md)
+> Bing Speech was decommissioned on October 15, 2019. If your applications, tools, or products are using the Bing Speech APIs, see [Migrate from Bing Speech to the Speech service](how-to-migrate-from-bing-speech.md).
## Get started
In addition to the standard Speech service model, you can create custom models.
Batch transcription is a set of REST API operations that enable you to transcribe a large amount of audio in storage. You can point to audio files with a shared access signature (SAS) URI and asynchronously receive transcription results. See the [how-to](batch-transcription.md) for more information on how to use the batch transcription API.
+## Reference docs
+
+The [Speech SDK](speech-sdk.md) provides most of the functionalities needed to interact with the Speech service. For scenarios such as model development and batch transcription you can use the REST API.
+
+### Speech SDK reference docs
+
+Use the following list to find the appropriate Speech SDK reference docs:
+
+- <a href="https://aka.ms/csspeech/csharpref" target="_blank" rel="noopener">C# SDK </a>
+- <a href="https://aka.ms/csspeech/cppref" target="_blank" rel="noopener">C++ SDK </a>
+- <a href="https://aka.ms/csspeech/javaref" target="_blank" rel="noopener">Java SDK </a>
+- <a href="https://aka.ms/csspeech/pythonref" target="_blank" rel="noopener">Python SDK</a>
+- <a href="https://aka.ms/csspeech/javascriptref" target="_blank" rel="noopener">JavaScript SDK</a>
+- <a href="https://aka.ms/csspeech/objectivecref" target="_blank" rel="noopener">Objective-C SDK </a>
+
+> [!TIP]
+> The Speech service SDK is actively maintained and updated. To track changes, updates and feature additions refer to the [Speech SDK release notes](releasenotes.md).
+
+### REST API references
+
+For Speech-to-text REST APIs, refer to the listing below:
+
+- [REST API: Speech-to-text](rest-speech-to-text.md)
+- [REST API: Pronunciation assessment](rest-speech-to-text.md#pronunciation-assessment-parameters)
+- <a href="https://westus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-0" target="_blank" rel="noopener">REST API: Batch transcription and customization </a>
## Next steps
cognitive-services Speech Translation https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/speech-translation.md
Previously updated : 09/01/2020 Last updated : 01/16/2022 keywords: speech translation
keywords: speech translation
In this overview, you learn about the benefits and capabilities of the speech translation service, which enables real-time, [multi-language speech-to-speech](language-support.md#speech-translation) and speech-to-text translation of audio streams. With the Speech SDK, your applications, tools, and devices have access to source transcriptions and translation outputs for provided audio. Interim transcription and translation results are returned as speech is detected, and final results can be converted into synthesized speech.
-This documentation contains the following article types:
-
-* **Quickstarts** are getting-started instructions to guide you through making requests to the service.
-* **How-to guides** contain instructions for using the service in more specific or customized ways.
-* **Concepts** provide in-depth explanations of the service functionality and features.
-* **Tutorials** are longer guides that show you how to use the service as a component in broader business solutions.
- ## Core features * Speech-to-text translation with recognition results.
cognitive-services Spx Basics https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/spx-basics.md
Previously updated : 04/28/2021 Last updated : 01/16/2022
cognitive-services Spx Overview https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/spx-overview.md
Previously updated : 01/13/2021 Last updated : 01/16/2022
cognitive-services Text To Speech https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/text-to-speech.md
Previously updated : 09/01/2020 Last updated : 01/16/2022 keywords: text to speech
keywords: text to speech
In this overview, you learn about the benefits and capabilities of the Text-to-Speech service, which enables your applications, tools, or devices to convert text into human-like synthesized speech. Use human-like prebuilt neural voices out-of-the-box, or create a custom neural voice unique to your product or brand. For a full list of supported voices, languages, and locales, see [supported languages](language-support.md#text-to-speech).
-This documentation contains the following article types:
-
-* **Quickstarts** are getting-started instructions to guide you through making requests to the service.
-* **How-to guides** contain instructions for using the service in more specific or customized ways.
-* **Responsible use of AI** provide in-depth explanations of how the service works, target use cases, limitations, and the responsible use principles.
- > [!NOTE] >
-> Bing Speech was decommissioned on October 15, 2019. If your applications, tools, or products are using the Bing Speech APIs or Custom Speech, we've created guides to help you migrate to the Speech service.
->
-> * [Migrate from Bing Speech to the Speech service](how-to-migrate-from-bing-speech.md)
+> Bing Speech was decommissioned on October 15, 2019. If your applications, tools, or products are using the Bing Speech APIs or Custom Speech, see [Migrate from Bing Speech to the Speech service](how-to-migrate-from-bing-speech.md).
## Core features
cognitive-services Tutorial Voice Enable Your Bot Speech Sdk https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cognitive-services/Speech-Service/tutorial-voice-enable-your-bot-speech-sdk.md
The voice-enabled chat bot that you make in this tutorial follows these steps:
1. The recognized text is passed to the echo bot as a Bot Framework activity. 1. The response text is turned into audio by the text-to-speech service, and streamed back to the client application for playback.
-<!-- svg src in User Story 1754106 -->
![Diagram that illustrates the flow of the Direct Line Speech channel.](media/tutorial-voice-enable-your-bot-speech-sdk/diagram.png "The Speech Channel flow") > [!NOTE]
data-factory Connector Rest https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/data-factory/connector-rest.md
Previously updated : 11/11/2021 Last updated : 01/13/2022
The corresponding REST copy activity source configuration especially the `pagina
} ```
+**Example: Pagination rules**
+
+If you want to send multiple sequence requests with one variable in a range, you can define a variable such as `{offset}`, `{id}` in AbsoluteUrl, Headers, QueryParameters, and define the range rule in pagination rules. See the following examples of pagination rules:
+
+- **Example 1**
+
+ You have multiple requests:
+
+ ```
+ baseUrl/api/now/table/incident?sysparm_limit=1000&sysparm_offset=0,
+
+ baseUrl/api/now/table/incident?sysparm_limit=1000&sysparm_offset=1000,
+
+ ......
+
+ baseUrl/api/now/table/incident?sysparm_limit=1000&sysparm_offset=10000
+ ```
+ You need to specify the range pagination:
+
+ `AbosoluteUrl = baseUrl/api/now/table/incident?sysparm_limit=1000&sysparm_offset={offset}`
+
+ The pagination rule is: `QueryParameter.{offset} = RANGE:0:10000:1000`
+
+- **Example 2**
+
+ You have multiple requests:
+
+ ```
+ baseUrl/api/now/table/t1
+
+ baseUrl/api/now/table/t2
+
+ ......
+
+ baseUrl/api/now/table/t100
+ ```
+ You need to specify the range pagination:
+
+ `AbosoluteUrl = baseUrl/api/now/table/t{id}`
+
+ The pagination rule is: `AbsoluteUrl.{id} = RANGE:1:100:1`
+ ## Use OAuth This section describes how to use a solution template to copy data from REST connector into Azure Data Lake Storage in JSON format using OAuth.
data-factory Control Flow Until Activity https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/data-factory/control-flow-until-activity.md
To use an Until activity in a pipeline, complete the following steps:
:::image type="content" source="media/control-flow-until-activity/until-activity.png" alt-text="Shows the Settings tab of the Until activity in the pipeline canvas.":::
-1. Enter an expression that will be evaluated after all child activities defined in the Until activity are executed. If the expression evaluates to true, the Until activity will execute all its child activities again. When it evaluates to false, the Until activity will complete. The expression can be a literal string expression, or any combination of dynamic [expressions, functions](control-flow-expression-language-functions.md), [system variables](control-flow-system-variables.md), or [outputs from other activities](how-to-expression-language-functions.md#examples-of-using-parameters-in-expressions). The example below checks the value of a previously defined pipeline array variable called TestVariable to see if it evaluates to ['done'].
+1. Enter an expression that will be evaluated after all child activities defined in the Until activity are executed. If the expression evaluates to false, the Until activity will execute all its child activities again. When it evaluates to true, the Until activity will complete. The expression can be a literal string expression, or any combination of dynamic [expressions, functions](control-flow-expression-language-functions.md), [system variables](control-flow-system-variables.md), or [outputs from other activities](how-to-expression-language-functions.md#examples-of-using-parameters-in-expressions). The example below checks the value of a previously defined pipeline array variable called TestVariable to see if it evaluates to ['done'].
:::image type="content" source="media/control-flow-until-activity/dynamic-content-to-check-variable-value.png" alt-text="Shows the &nbsp;Add dynamic content&nbsp; pane with an expression to check a variable for a defined value.":::
data-factory Parameterize Linked Services https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/data-factory/parameterize-linked-services.md
Previously updated : 11/22/2021 Last updated : 01/17/2022
All the linked service types are supported for parameterization.
- MySQL - Oracle - Oracle Cloud Storage
+- Salesforce
+- Salesforce Service Cloud
- SFTP - SQL Server
databox-online Azure Stack Edge Deploy Prep https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/databox-online/azure-stack-edge-deploy-prep.md
Before you begin, make sure that:
If you're an existing Azure Stack Edge Pro FPGA customer, use the following procedure to create a new resource if you need to replace or reset your existing device.
-If you're a new customer, we recommend that you explore using Azure Stack Edge Pro - GPU devices for your workloads. For more information, go to [What is Azure Stack Edge Pro with GPU](azure-stack-edge-gpu-overview.md). For information about ordering an Azure Stack Edge Pro with GPU device, go to [Create a new resource for Azure Stack Edge Pro - GPU](azure-stack-edge-gpu-deploy-prep.md?tabs=azure-portal#create-a-new-resource).
+If you're a new customer, we recommend that you explore using Azure Stack Edge Pro - GPU devices for your workloads. For more information, go to [What is Azure Stack Edge Pro with GPU](azure-stack-edge-gpu-overview.md). For information about ordering an Azure Stack Edge Pro with GPU device, go to [Create a new resource for Azure Stack Edge Pro - GPU](azure-stack-edge-gpu-deploy-prep.md#create-a-new-resource).
To create a new Azure Stack Edge resource for an existing device, take the following steps in the Azure portal.
databox-online Azure Stack Edge Gpu Deploy Prep https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/databox-online/azure-stack-edge-gpu-deploy-prep.md
Before you begin, make sure that:
If you have an existing Azure Stack Edge resource to manage your physical device, skip this step and go to [Get the activation key](#get-the-activation-key).
-### [Azure Edge Hardware Center (Preview)](#tab/azure-edge-hardware-center)
+### Create an order resource
-Azure Edge Hardware Center (Preview) lets you explore and order a variety of hardware from the Azure hybrid portfolio including Azure Stack Edge Pro devices.
+To create an order resource, use the Azure Edge Hardware Center. [Azure Edge Hardware Center](../azure-edge-hardware-center/azure-edge-hardware-center-overview.md) lets you explore and order a variety of hardware from the Azure hybrid portfolio including Azure Stack Edge Pro devices.
-When you place an order through the Azure Edge Hardware Center, you can order multiple devices, to be shipped to more than one address, and you can reuse ship to addresses from other orders.
+When you place an order through the Edge Hardware Center, you can order multiple devices, to be shipped to more than one address, and you can reuse ship to addresses from other orders.
-Ordering through Azure Edge Hardware Center will create an Azure resource that will contain all your order-related information. One resource each will be created for each of the units ordered. You will have to create an Azure Stack Edge resource after you receive the device to activate and manage it.
+Ordering through Edge Hardware Center will create an Azure resource that will contain all your order-related information. One resource each will be created for each of the units ordered. You will have to create an Azure Stack Edge resource after you receive the device to activate and manage it.
[!INCLUDE [Create order in Azure Edge Hardware Center](../../includes/azure-edge-hardware-center-new-order.md)]
-#### Create a management resource for each device
+### Create a management resource for each device
[!INCLUDE [Create management resource](../../includes/azure-edge-hardware-center-create-management-resource.md)]
-### [Azure CLI](#tab/azure-cli)
+<!--### [Azure CLI](#tab/azure-cli)
If necessary, prepare your environment for Azure CLI.
The resource creation takes a few minutes. Run the [az databoxedge order show](/
az databoxedge order show --resource-group myasepgpu1 --device-name myasegpu1 ```
-After you place an order, Microsoft reviews the order and contacts you by email with shipping details.
+After you place an order, Microsoft reviews the order and contacts you by email with shipping details.-->
databox-online Azure Stack Edge Return Device https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/databox-online/azure-stack-edge-return-device.md
To begin the return process, take the following steps.
If you used the Azure Edge Hardware Center to order your device, follow these steps to return the device:
-1. In the Azure portal, go to your Azure Edge Hardware Center order item resource. In the **Overview**, go to the top command bar in the right pane and select **Return**. The return option is only enabled after you have received a device.
- ![Return device 1](media/azure-stack-edge-return-device/hardware-center-return-device-1.png)
-
-1. In the **Return hardware** blade, provide the following information:
-
- ![Return device 2](media/azure-stack-edge-return-device/hardware-center-return-device-2.png)
-
- 1. From the dropdown list, select a **Reason for returning**.
-
- 1. Provide the serial number of the device. To get the device serial number, go the local web UI of the device and then go to **Overview**.
-
- ![Device serial number 1](media/azure-stack-edge-return-device/device-serial-number-1.png)
-
- 1. (Optionally) Enter the **Service tag** number. The service tag number is an identifier with five or more characters, which is unique to your device. The service tag is located on the bottom-right corner of the device (as you face the device). Pull out the information tag (it is a slide-out label panel). This panel contains system information such as service tag, NIC, MAC address, and so on.
-
- ![Service tag number 1](media/azure-stack-edge-return-device/service-tag-number-1.png)
-
- 1. To request a return shipping box, check the **Shipping box required to return the hardware unit**.you can request it. Answer **Yes** to the question **Need an empty box to return**.
-
- 1. Review the **Privacy terms**, and select the checkbox by the note that you have reviewed and agree to the privacy terms.
-
- 1. Verify the **Pickup details**. By default, these are set to your shipping address. You can add a new address or select a different one from the saved addresses for the return pickup.
-
- ![Return device 3](media/azure-stack-edge-return-device/hardware-center-return-device-3.png)
-
- 1. Select **Initiate return**.
-
-1. Once the return request is submitted, the order item resource starts reflecting the status of your return shipment. The status progresses from **Return initiated** to **Picked up** to **Return completed**. Use the portal to check the return status of your resource at any time.
-
- ![Return device 5](media/azure-stack-edge-return-device/hardware-center-return-device-4.png)
-
-1. Once the request is initiated, the Azure Stack Edge operations team reaches out to you to help schedule the device pickup.
The next step is to package the device.
defender-for-cloud Defender For Containers Introduction https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/defender-for-cloud/defender-for-containers-introduction.md
Title: Container security with Microsoft Defender for Cloud description: Learn about Microsoft Defender for Containers Previously updated : 01/08/2022 Last updated : 01/17/2022 # Overview of Microsoft Defender for Containers
On this page, you'll learn how how you can use Defender for Containers to improv
| Release state: | General availability (GA)<br>Where indicated, specific features are in preview. [!INCLUDE [Legalese](../../includes/defender-for-cloud-preview-legal-text.md)] | | Pricing: | **Microsoft Defender for Containers** is billed as shown on the [pricing page](https://azure.microsoft.com/pricing/details/defender-for-cloud/) | | Registries and images: | **Supported**<br> ΓÇó Linux images in Azure Container Registry (ACR) registries accessible from the public internet with shell access<br> ΓÇó Private registries with access granted to [Trusted Services](../container-registry/allow-access-trusted-services.md#trusted-services)<br> ΓÇó [ACR registries protected with Azure Private Link](../container-registry/container-registry-private-link.md)<br><br>**Unsupported**<br> ΓÇó Windows images<br> ΓÇó Super-minimalist images such as [Docker scratch](https://hub.docker.com/_/scratch/) images<br> ΓÇó "Distroless" images that only contain an application and its runtime dependencies without a package manager, shell, or OS<br> ΓÇó Images with [Open Container Initiative (OCI) Image Format Specification](https://github.com/opencontainers/image-spec/blob/master/spec.md) |
-| Kubernetes distributions and configurations: | **Supported**<br> ΓÇó Any Cloud Native Computing Foundation (CNCF) certified Kubernetes clusters<br><br>**Unsupported**<br> ΓÇó Any [taints](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) applied to your nodes *might* disrupt the configuration of Defender for Containers<br><br>**Tested on**<br> ΓÇó [Azure Kubernetes Service](../aks/intro-kubernetes.md)<br> ΓÇó [Amazon Elastic Kubernetes Service (EKS)](https://aws.amazon.com/eks/)<br> ΓÇó [Azure Kubernetes Service on Azure Stack HCI](/azure-stack/aks-hci/overview)<br> ΓÇó [Kubernetes](https://kubernetes.io/docs/home/)<br> ΓÇó [AKS Engine](https://github.com/Azure/aks-engine)<br> ΓÇó [Azure Red Hat OpenShift](https://azure.microsoft.com/services/openshift/)<br> ΓÇó [Red Hat OpenShift](https://www.openshift.com/learn/topics/kubernetes/) (version 4.6 or newer)<br> ΓÇó [VMware Tanzu Kubernetes Grid](https://tanzu.vmware.com/kubernetes-grid)<br> ΓÇó [Rancher Kubernetes Engine](https://rancher.com/docs/rke/latest/en/) |
+| Kubernetes distributions and configurations: | **Supported**<br> ΓÇó Any Cloud Native Computing Foundation (CNCF) certified Kubernetes clusters<br><br>**Unsupported**<br> ΓÇó Any [taints](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) applied to your nodes *might* disrupt the configuration of Defender for Containers<br>ΓÇóThe AKS Defender profile doesn't support AKS clusters that don't have RBAC enabled.<br><br>**Tested on**<br> ΓÇó [Azure Kubernetes Service](../aks/intro-kubernetes.md)<br> ΓÇó [Amazon Elastic Kubernetes Service (EKS)](https://aws.amazon.com/eks/)<br> ΓÇó [Azure Kubernetes Service on Azure Stack HCI](/azure-stack/aks-hci/overview)<br> ΓÇó [Kubernetes](https://kubernetes.io/docs/home/)<br> ΓÇó [AKS Engine](https://github.com/Azure/aks-engine)<br> ΓÇó [Azure Red Hat OpenShift](https://azure.microsoft.com/services/openshift/)<br> ΓÇó [Red Hat OpenShift](https://www.openshift.com/learn/topics/kubernetes/) (version 4.6 or newer)<br> ΓÇó [VMware Tanzu Kubernetes Grid](https://tanzu.vmware.com/kubernetes-grid)<br> ΓÇó [Rancher Kubernetes Engine](https://rancher.com/docs/rke/latest/en/) |
| Required roles and permissions: | ΓÇó To auto provision the required components, [Contributor](../role-based-access-control/built-in-roles.md#contributor), [Log Analytics Contributor](../role-based-access-control/built-in-roles.md#log-analytics-contributor), or [Azure Kubernetes Service Contributor Role](../role-based-access-control/built-in-roles.md#azure-kubernetes-service-contributor-role)<br> ΓÇó **Security admin** can dismiss alerts<br> ΓÇó **Security reader** can view vulnerability assessment findings<br> See also [Azure Container Registry roles and permissions](../container-registry/container-registry-roles.md) | | Clouds: | :::image type="icon" source="./media/icons/yes-icon.png"::: Commercial clouds<br>:::image type="icon" source="./media/icons/yes-icon.png"::: National (Azure Government, Azure China 21Vianet) (Except for preview features)<br>:::image type="icon" source="./media/icons/yes-icon.png"::: Connected AWS accounts (Preview) | | | |
defender-for-cloud Defender For Databases Introduction https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/defender-for-cloud/defender-for-databases-introduction.md
Title: Microsoft Defender for open-source relational databases - the benefits and features description: Learn about the benefits and features of Microsoft Defender for open-source relational databases such as PostgreSQL, MySQL, and MariaDB Previously updated : 11/09/2021 Last updated : 01/17/2022
Defender for Cloud detects anomalous activities indicating unusual and potential
## Availability
-| Aspect | Details |
-||:-|
-| Release state: | General availability (GA) |
-| Pricing: | **Microsoft Defender for open-source relational databases** is billed as shown on the [pricing page](https://azure.microsoft.com/pricing/details/defender-for-cloud/) |
-| Protected versions of PostgreSQL: | Single Server - General Purpose and Memory Optimized. Learn more in [PostgreSQL pricing tiers](../postgresql/concepts-pricing-tiers.md). |
-| Protected versions of MySQL: | Single Server - General Purpose and Memory Optimized. Learn more in [MySQL pricing tiers](../mysql/concepts-pricing-tiers.md). |
-| Protected versions of MariaDB: | General Purpose and Memory Optimized. Learn more in [MariaDB pricing tiers](../mariadb/concepts-pricing-tiers.md). |
-| Clouds: | :::image type="icon" source="./media/icons/yes-icon.png"::: Commercial clouds<br>:::image type="icon" source="./media/icons/no-icon.png"::: National (Azure Government, Azure China 21Vianet) |
-| | |
+| Aspect | Details |
+|--|:-|
+| Release state: | General availability (GA) |
+| Pricing: | **Microsoft Defender for open-source relational databases** is billed as shown on the [pricing page](https://azure.microsoft.com/pricing/details/defender-for-cloud/) |
+| Protected versions of PostgreSQL: | Single Server - General Purpose and Memory Optimized. Learn more in [PostgreSQL pricing tiers](../postgresql/concepts-pricing-tiers.md). |
+| Protected versions of MySQL: | Single Server - General Purpose and Memory Optimized. Learn more in [MySQL pricing tiers](../mysql/concepts-pricing-tiers.md). |
+| Protected versions of MariaDB: | General Purpose and Memory Optimized. Learn more in [MariaDB pricing tiers](../mariadb/concepts-pricing-tiers.md). |
+| Clouds: | :::image type="icon" source="./media/icons/yes-icon.png"::: Commercial clouds<br> :::image type="icon" source="./media/icons/yes-icon.png"::: Azure Government<br>:::image type="icon" source="./media/icons/no-icon.png"::: Azure China 21Vianet |
## What are the benefits of Microsoft Defender for open-source relational databases?
defender-for-cloud Enable Data Collection https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/defender-for-cloud/enable-data-collection.md
Title: Auto-deploy agents for Microsoft Defender for Cloud | Microsoft Docs description: This article describes how to set up auto provisioning of the Log Analytics agent and other agents and extensions used by Microsoft Defender for Cloud Previously updated : 01/10/2022 Last updated : 01/17/2022 # Configure auto provisioning for agents and extensions from Microsoft Defender for Cloud
This table shows the availability details for the various components that can be
| Release state: | ΓÇó Defender profile is in preview<br> ΓÇó Azure Policy add-on is generally available (GA) | ΓÇó Defender extension is in preview<br> ΓÇó Azure Policy extension for Azure Arc is in preview | | Relevant Defender plan: | [Microsoft Defender for Containers](defender-for-containers-introduction.md) | [Microsoft Defender for Containers](defender-for-containers-introduction.md) | | Required roles and permissions (subscription-level): | [Owner](../role-based-access-control/built-in-roles.md#owner) | [Owner](../role-based-access-control/built-in-roles.md#owner) |
-| Supported destinations: | Any [taints](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) applied to your nodes *might* disrupt the configuration of Defender for Containers | Any Cloud Native Computing Foundation (CNCF) certified Kubernetes clusters |
+| Supported destinations: | Any [taints](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) applied to your nodes *might* disrupt the configuration of Defender for Containers <br><br> The AKS Defender profile doesn't support AKS clusters that don't have RBAC enabled. | Any Cloud Native Computing Foundation (CNCF) certified Kubernetes clusters |
| Policy-based: | :::image type="icon" source="./media/icons/yes-icon.png"::: Yes | :::image type="icon" source="./media/icons/yes-icon.png"::: Yes | | Clouds: | **Defender profile**:<br>:::image type="icon" source="./media/icons/yes-icon.png"::: Commercial clouds<br>:::image type="icon" source="./media/icons/no-icon.png"::: Azure Government, Azure China 21Vianet<br>**Azure Policy add-on**:<br>:::image type="icon" source="./media/icons/yes-icon.png"::: Commercial clouds<br>:::image type="icon" source="./media/icons/yes-icon.png"::: Azure Government, Azure China 21Vianet|**Defender extension**:<br>:::image type="icon" source="./media/icons/yes-icon.png"::: Commercial clouds<br>:::image type="icon" source="./media/icons/no-icon.png"::: Azure Government, Azure China 21Vianet<br>**Azure Policy extension for Azure Arc**:<br>:::image type="icon" source="./media/icons/yes-icon.png"::: Commercial clouds<br>:::image type="icon" source="./media/icons/no-icon.png"::: Azure Government, Azure China 21Vianet|
hdinsight Apache Kafka Connect Vpn Gateway https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/hdinsight/kafka/apache-kafka-connect-vpn-gateway.md
Use the steps in this section to create the following configuration:
$vpnClientAddressPool = "172.16.201.0/24" # HDInsight settings
- $HdiWorkerNodes = 4
+ $hdiWorkerNodes = 4
$hdiVersion = "3.6" $hdiType = "Kafka" ```
mysql Whats New https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/mysql/flexible-server/whats-new.md
Last updated 10/12/2021
[Azure Database for MySQL - Flexible Server](./overview.md) is a deployment mode that's designed to provide more granular control and flexibility over database management functions and configuration settings than does the Single Server deployment mode. The service currently supports community version of MySQL 5.7 and 8.0. This article summarizes new releases and features in Azure Database for MySQL - Flexible Server beginning in January 2021. Listings appear in reverse chronological order, with the most recent updates first.
+## January 2022
+- **Bug fixes**
+
+ Restart workflow struck issue with servers with HA and Geo-redundant backup option enabled is fixed.
+
+- **Known issues**
+
+ When you are using ARM templates for provisioning or configuration changes for HA enabled servers, if a single deployment is made to enable/disable HA and along with other server properties like backup redundancy, storage etc. then deployment would fail. You can mitigate it by submit the deployment request separately for to enable\disable and configuration changes. You would not have issue with Portal or Azure cli as these are request already separated.
## November 2021 - **General Availability of Azure Database for MySQL - Flexible Server**
This article summarizes new releases and features in Azure Database for MySQL -
- **Known issues**
-On servers where we have HA and Geo-redundant backup option enabled, we found an rare issue encountered by a race condition which blocks the restart of the standby server to finish. As a result of this issue, when you failover the HA enabled Azure database for MySQL - Flexible server MySQL Instance may get stuck in restarting state for a long time. The fix will be deployed to the production in the next deployment cycle.
+ On servers where we have HA and Geo-redundant backup option enabled, we found an rare issue encountered by a race condition which blocks the restart of the standby server to finish. As a result of this issue, when you failover the HA enabled Azure database for MySQL - Flexible server MySQL Instance may get stuck in restarting state for a long time. The fix will be deployed to the production in the next deployment cycle.
## October 2021
sentinel Connect Syslog https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/sentinel/connect-syslog.md
All connectors listed in the gallery will display any specific instructions on t
If the instructions on your data connector's page in Microsoft Sentinel indicate that the Kusto functions are deployed as [Advanced SIEM Information Model (ASIM)](normalization.md) parsers, make sure that you have the ASIM parsers deployed to your workspace.
-Use the link in the data connector page to deploy your parsers, or follow the instructions from the [Microsoft Sentinel GitHub repository](https://github.com/Azure/Azure-Sentinel/tree/master/Parsers/ASim).
+Use the link in the data connector page to deploy your parsers, or follow the instructions from the [Microsoft Sentinel GitHub repository](https://github.com/Azure/Azure-Sentinel/tree/master/ASIM).
For more information, see [Advanced SIEM Information Model (ASIM) parsers](normalization-about-parsers.md).
sentinel Normalization About Schemas https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/sentinel/normalization-about-schemas.md
The following fields are generated by Log Analytics for each record. They can be
| Field | Type | Discussion | | - | -- | -- | | <a name="timegenerated"></a>**TimeGenerated** | datetime | The time the event was generated by the reporting device.|
-| **_ResourceId** | guid | The Azure Resource ID of the reporting device or service, or the log forwarder resource ID for events forwarded by using Syslog, CEF, or WEF. |
+| **_ResourceId** | guid | The Azure Resource ID of the reporting device or service, or the log forwarder resource ID for events forwarded by using Syslog, CEF, or WEF. **_ResourceId** is not generated for sources for that do not have a resource concept, such as Microsoft Defender for Endpoint and will be empty for events from these sources. |
| **Type** | String | The original table from which the record was fetched. This field is useful when the same event can be received through multiple channels to different tables, and have the same [EventVendor](#eventvendor) and [EventProduct](#eventproduct) values.<br><br>For example, a Sysmon event can be collected either to the `Event` table or to the `WindowsEvent` table. | | | | |
sentinel Normalization Develop Parsers https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/sentinel/normalization-develop-parsers.md
You can also combine multiple templates to a single deploy process using [linked
## Test parsers
-### Mandatory tests
+### Install ASIM testing tools
-The following tests are mandatory. A parser that fails will prevent queries using the schema unifying parsers it is part of from working correctly:
+To test ASIM, [deploy the ASIM testing tool](https://aka.ms/ASimTestingTools) to a Microsoft Sentinel workspace where:
+- Your parser is deployed.
+- The source table used by the parser is available.
+- The source table used by the parser is populated with a varied collection of relevant events.
-- Make sure that the parser produces all mandatory fields.
+### Validate the output schema
-- Make sure that all normalized fields have the correct type.
+To make sure that your parser produces a valid schema, use the ASIM schema tester by running the following query in the Microsoft Sentinel **Logs** page:
-- Make sure that fields with logical types are populated only with permitted values. For example, an IP address field is always populated with a valid IP address, and that an enumerated field always gets permitted values.
+ ```KQL
+ <parser name> | getschema | invoke ASimSchemaTester('<schema>')
+ ```
-The ASIM parser testing tool tests for mandatory fields and correct field types.
+Handle the results as follows:
+
+| Message | Action |
+| - | |
+| **(0) Error: Missing mandatory field [\<Field\>]** | Add this field to your parser. In many cases, this would be a derived value or a constant value, and not a field already available from the source. |
+| **(0) Error: Missing mandatory alias [\<Field\>] aliasing existing column [\<Field\>]** | Add this alias to your parser. |
+| **(0) Error: Missing mandatory alias [\<Field\>] aliasing missing column [\<Field\>]** | This error accompanies a similar error for the aliased field. Correct the aliased field error and add this alias to your parser. |
+| **(0) Error: Missing recommended alias [\<Field\>] aliasing existing column [\<Field\>]** | Add this alias to your parser. |
+| **(0) Error: Missing optional alias [\<Field\>] aliasing existing column [\<Field\>]** | Add this alias to your parser. |
+| **(0) Error: type mismatch for field [\<Field\>]. It is currently [\<Type\>] and should be [\<Type\>]** | Make sure that the type of normalized field is correct, usually by using a [conversion function](/azure/data-explorer/kusto/query/scalarfunctions#conversion-functions) such as `tostring`. |
+| **(1) Warning: Missing recommended field [\<Field\>]** | Consider adding this field to your parser. |
+| **(1) Warning: Missing recommended alias [\<Field\>] aliasing non-existent column [\<Field\>]** | If you add the aliased field to the parser, make sure to add this alias as well. |
+| **(1) Warning: Missing optional alias [\<Field\>] aliasing non-existent column [\<Field\>]** | If you add the aliased field to the parser, make sure to add this alias as well. |
+| **(2) Info: Missing optional field [\<Field\>]** | While optional fields are often missing, it is worth reviewing the list to determine if any of the optional fields can be mapped from the source. |
+| **(2) Info: extra unnormalized field [\<Field\>]** | While unnormalized fields are valid, it is worth reviewing the list to determine if any of the unnormalized values can be mapped to an optional field. |
+|||
-### Optional tests
+> [!NOTE]
+> Errors will prevent content using the parser from working correctly. Warnings will not prevent content from working, but may reduce the quality of the results.
+>
+
+### Validate the output values
+
+To make sure that your parser produces valid values, use the ASIM data tester by running the following query in the Microsoft Sentinel **Logs** page:
+
+ ```KQL
+ <parser name> | limit <X> | invoke ASimDataTester('<schema>')
+ ```
+
+This test is resource intensive and may not work on your entire data set. Set X to the largest number for which the query will not timeout, or set the time range for the query using the time range picker.
+
+Handle the results as follows:
+
+| Message | Action |
+| - | |
+| **(0) Error: type mismatch for column [\<Field\>]. It is currently [\<Type\>] and should be [\<Type\>]** | Make sure that the type of normalized field is correct, usually by using a [conversion function](/azure/data-explorer/kusto/query/scalarfunctions#conversion-functions) such as `tostring`. |
+| **(0) Error: Invalid value(s) (up to 10 listed) for field [\<Field\>] of type [\<Logical Type\>]** | Make sure that the parser maps the correct source field to the output field. If mapped correctly, update the parser to transform the source value to the correct type, value or format. Refer to the [list of logical types](normalization-about-schemas.md#logical-types) for more information on the correct values and formats for each logical type. <br><br>Note that the testing tool lists only a sample of 10 invalid values. |
+| **(0) Error: Empty value in mandatory field [\<Field\>]** | Mandatory fields should be populated, not just defined. Check whether the field can be populated from other sources for records for which the current source is empty. |
+| **(1) Error: Empty value in recommended field [\<Field\>]** | Recommended fields should usually be populated. Check whether the field can be populated from other sources for records for which the current source is empty. |
+| **(1) Error: Empty value in alias [\<Field\>]** | Check whether the aliased field is mandatory or recommended, and if so, whether it can be populated from other sources. |
+|||
++
+> [!NOTE]
+> Errors will prevent content using the parser from working correctly. Warnings will not prevent content from working, but may reduce the quality of the results.
+>
++
+### Check for incomplete parsing
Check that fields are populated: - A field that is rarely or never populated may indicate incorrect parsing.
You can use the following query to test how sparsely populated each field is.
Set the time period to the longest that performance will allow.
-### Using the ASIM parser testing tool
-
-Test the parser using the ASIM parser testing tool to find missing mandatory or recommended fields and fields with an incorrect type:
-
-1. [Deploy the ASIM testing tool]() to a Microsoft Sentinel workspace where your parser is deployed and works.
-
-1. Run the following query in the Microsoft Sentinel **Logs** page:
-
- ```KQL
- <parser name> | getschema | invoke ASimSchemaTester('<schema>')
- ```
-
-Handle the results as follows:
-
-| Message | Action |
-| - | |
-| **(0) Error: Missing mandatory field [\<Field\>]** | Add this field to your parser. In many cases, this would be a derived value or a constant value, and not a field already available from the source. |
-| **(0) Error: type mismatch for field [\<Field\>]. It is currently [\<Type\>] and should be [\<Type\>]** | Make sure that the type of normalized field is correct, usually by using a [conversion function](/azure/data-explorer/kusto/query/scalarfunctions#conversion-functions) such as `tostring`. |
-| **(1) Warning: Missing recommended field [\<Field\>]** | Consider adding this field to your parser. |
-| **(1) Warning: Missing alias [\<Field\>]** | Check if the field the alias refers to exists and if so, add the alias. |
-| **(2) Info: Missing optional field [\<Field\>]** | While optional fields are often missing, it is worth reviewing the list to determine if any of the optional fields can be mapped from the source. |
-| **(2) Info: extra unnormalized field [\<Field\>]** | While unnormalized fields are valid, it is worth reviewing the list to determine if any of the unnormalized values can be mapped to an optional field. |
-|||
-- ## <a name="next-steps"></a>Next steps This article discusses developing ASIM parsers.
site-recovery Deploy Vmware Azure Replication Appliance Preview https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/site-recovery/deploy-vmware-azure-replication-appliance-preview.md
Last updated 09/01/2021
> The information in this article applies to Azure Site Recovery - Preview. For information about configuration server requirements in Classic releases, [see this article](vmware-azure-configuration-server-requirements.md). >[!NOTE]
-> Ensure you create a new Recovery Services vault for setting up the preview appliance. Don't use an existing vault.
+> Ensure you create a new and exclusive Recovery Services vault for setting up the preview appliance. Don't use an existing vault.
>[!NOTE] > Enabling replication for physical machines is not supported with this preview.
site-recovery Vmware Azure Troubleshoot Replication https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/site-recovery/vmware-azure-troubleshoot-replication.md
When you try to select the source machine to enable replication by using Site Re
* **vCenter not connected**: Check if vCenter is in connected state. To verify, go to Recovery Services vault > Site Recovery Infrastructure > Configuration Servers > Click on respective configuration server > a blade opens on your right with details of associated servers. Check if vCenter is connected. If it's in a "Not Connected" state, resolve the issue and then [refresh the configuration server](vmware-azure-manage-configuration-server.md#refresh-configuration-server) on the portal. After this, virtual machine will be listed on the portal. * **ESXi powered off**: If ESXi host under which the virtual machine resides is in powered off state, then virtual machine will not be listed or will not be selectable on the Azure portal. Power on the ESXi host, [refresh the configuration server](vmware-azure-manage-configuration-server.md#refresh-configuration-server) on the portal. After this, virtual machine will be listed on the portal. * **Pending reboot**: If there is a pending reboot on the virtual machine, then you will not be able to select the machine on Azure portal. Ensure to complete the pending reboot activities, [refresh the configuration server](vmware-azure-manage-configuration-server.md#refresh-configuration-server). After this, virtual machine will be listed on the portal.
-* **IP not found**: If the virtual machine doesn't have a valid IP address associated with it, then you will not be able to select the machine on Azure portal. Ensure to assign a valid IP address to the virtual machine, [refresh the configuration server](vmware-azure-manage-configuration-server.md#refresh-configuration-server). After this, virtual machine will be listed on the portal.
+* **IP not found or Machine does not have IP address**: If the virtual machine doesn't have a valid IP address associated with it, then you will not be able to select the machine on Azure portal. Ensure to assign a valid IP address to the virtual machine, [refresh the configuration server](vmware-azure-manage-configuration-server.md#refresh-configuration-server). It could also be caused if the machine does not have a valid IP address associated with one of its NIC's. Either assign a valid IP address to all NIC's or remove the NIC that's missing the IP. After this, virtual machine will be listed on the portal.
++ ### Troubleshoot protected virtual machines greyed out in the portal
site-recovery Vmware Physical Mobility Service Overview https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/site-recovery/vmware-physical-mobility-service-overview.md
During a push installation of the Mobility service, the following steps are perf
- Run this command to install the agent. ```cmd
- UnifiedAgent.exe /Role "MS" /InstallLocation "C:\Program Files (x86)\Microsoft Azure Site Recovery" /Platform "VmWare" /Silent
+ UnifiedAgent.exe /Role "Agent" /InstallLocation "C:\Program Files (x86)\Microsoft Azure Site Recovery" /Platform "VmWare" /Silent
``` - Run these commands to register the agent with the configuration server.
During a push installation of the Mobility service, the following steps are perf
Setting | Details |
-Syntax | `UnifiedAgent.exe /Role \<MS/MT> /InstallLocation \<Install Location> /Platform "VmWare" /Silent`
+Syntax | `UnifiedAgent.exe /Role \<Agent/MasterTarget> /InstallLocation \<Install Location> /Platform "VmWare" /Silent`
Setup logs | `%ProgramData%\ASRSetupLogs\ASRUnifiedAgentInstaller.log` `/Role` | Mandatory installation parameter. Specifies whether the Mobility service (Agent) or master target (MasterTarget) should be installed. Note: in prior versions, the correct switches were Mobility Service (MS) or master target (MT) `/InstallLocation`| Optional parameter. Specifies the Mobility service installation location (any folder).
Agent configuration logs | `%ProgramData%\ASRSetupLogs\ASRUnifiedAgentConfigurat
Setting | Details |
-Syntax | `./install -d \<Install Location> -r \<MS/MT> -v VmWare -q`
-`-r` | Mandatory installation parameter. Specifies whether the Mobility service (MS) or master target (MT) should be installed.
+Syntax | `./install -d \<Install Location> -r \<Agent/MasterTarget> -v VmWare -q`
+`-r` | Mandatory installation parameter. Specifies whether the Mobility service (Agent) or master target (MasterTarget) should be installed.
`-d` | Optional parameter. Specifies the Mobility service installation location: `/usr/local/ASR`. `-v` | Mandatory. Specifies the platform on which Mobility service is installed. <br/> **VMware** for VMware VMs/physical servers. <br/> **Azure** for Azure VMs. `-q` | Optional. Specifies whether to run the installer in silent mode.
static-web-apps Configuration https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/static-web-apps/configuration.md
In addition to IP address blocks, you can also specify [service tags](../virtual
* [Default authentication providers](authentication-authorization.md#login), don't require settings in the configuration file. * [Custom authentication providers](authentication-custom.md) use the `auth` section of the settings file.
+## Disable cache for authenticated paths
+
+If you have enabled [enterprise-grade edge](enterprise-edge.md), or set up [manual integration with Azure Front Door](front-door-manual.md), you may want to disable caching for your secured routes.
+
+To disable Azure Front Door caching for secured routes, add `"Cache-Control": "no-store"` to the route header definition.
+
+For example:
+
+```json
+{
+ "route": "/members",
+ "allowedRoles": ["authenticated, members"],
+ "headers": {
+ "Cache-Control": "no-store"
+ }
+}
+```
+ ## Forwarding gateway The `forwardingGateway` section configures how a static web app is accessed from a forwarding gateway such as a CDN or Azure Front Door.
For example, the following configuration shows how you can add a unique identifi
- Key/value pairs can be any set of arbitrary strings - Keys are case insensitive-- Values are case sensitive
+- Values are case-sensitive
## Example configuration file
static-web-apps Front Door Manual https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/static-web-apps/front-door-manual.md
Previously updated : 09/20/2021 Last updated : 01/12/2022
In this tutorial, you learn how to:
> [!div class="checklist"] >
-> - Create an Azure Front Door instance
+> - Create an Azure Front Door Standard/Premium instance
> - Associate Azure Front Door with your Azure Static Web Apps site > [!NOTE]
-> This tutorial requires the Azure Static Web Apps Standard plan.
+> This tutorial requires the Azure Static Web Apps Standard and Azure Front Door Standard / Premium plans.
-## Copy URL
+## Copy web app URL
1. Navigate to the Azure portal.
In this tutorial, you learn how to:
## Add Azure Front Door
-1. Navigate to the Azure portal.
+1. Navigate to the Azure home screen.
1. Select **Create a resource**.
-1. Search for **Azure Front Door**.
+1. Search for **Front Door**.
-1. Select **Front Door**.
+1. Select **Front Door Standard/Premium**.
- Make sure not to select the service labeled *Front Door Standard/Premium* as the steps for the Standard/Premium service differ from what's presented in this tutorial.
+ Make sure to select the service labeled *Front Door Standard/Premium* and not the plain *Front Door* option.
1. Select **Create**.
+1. Select the **Azure Front Door Standard/Premium** option.
+
+1. Select the **Quick create** option.
+
+1. Select the **Continue to create a front door** button.
+ 1. In the *Basics* tab, enter the following values: | Setting | Value |
In this tutorial, you learn how to:
| Subscription | Select your Azure subscription. | | Resource group | Enter a resource group name. This name is often the same group name used by your static web app. | | Resource group location | If you create a new resource group, enter the location nearest you. |
+ | Name | Enter **my-static-web-app-front-door**. |
+ | Tier | Select **Standard**. |
+ | Endpoint name | Enter a unique name for your Front Door host. |
+ | Origin type | Select **Custom**. |
+ | Origin host name | Enter the hostname of your static web app that you set aside from the beginning of this tutorial. Make sure your value does not include a trailing slash or protocol. (For example, `desert-rain-04056.azurestaticapps.net`) |
+ | Caching | Check the **Enable caching** checkbox. |
+ | Query string caching behavior | Select **Use Query string** from the dropdown. |
- Select **Next: Configuration >**.
+1. Select **Review + create**.
-1. In the *Configuration* tab, select the **plus sign** next to *Frontends/domains*, and enter the following value:
+1. Select **Create**.
- | Setting | Value |
- |||
- | Host name | Enter a unique name for your Front Door host. |
+ The creation process may take a few minutes to complete.
- Accept the defaults for the rest of the form, and select **Add**.
+1. Select **Go to resource**.
-1. Select the **plus sign** next to *Backend pools*, and enter the following value:
+## Disable cache for auth workflow
- | Setting | Value |
- |||
- | Name | Enter **my-static-web-app-pool**. |
+Add the following settings to disable Front Door's caching policies from trying to cache authentication and authorization-related pages.
-1. Select **+ Add a backend**, and enter the following values:
+### Add a condition
- | Setting | Value |
- |||
- | Backend host type | Select **Custom host**. |
- | Backend host name | Enter the hostname of your static web app. Make sure your value does not include a trailing slash or protocol. (For example, `desert-rain-04056.azurestaticapps.net`) |
- | Backend host header | Enter the hostname of your static web app. Make sure your value does not include a trailing slash protocol. (For example, `desert-rain-04056.azurestaticapps.net`) |
-
- Accept the defaults for the rest of the form, and select **Add**.
+1. Under *Settings*, select **Rule set**.
1. Select **Add**.
-1. Select the **plus sign** next to *Routing rule*, and enter the following value:
+1. In the *Rule set name* textbox, enter **Security**.
- | Setting | Value |
- |||
- | Name | Enter **my-routing-rule**. |
+1. In the *Rule name* textbox, enter **NoCacheAuthRequests**.
- Accept the defaults for the rest of the form, and select **Add**.
+1. Select **Add a condition**.
-1. Select **Review + create**.
+1. Select **Request path**.
-1. Select **Create**.
+1. Select **Begins With** in the *Operator* drop down.
- The creation process may take a few minutes to complete.
+1. Select the **Edit** link above the *Value* textbox.
-1. Select **Go to resource**.
+1. Enter **/.auth** in the textbox.
-1. Select **Overview**.
+1. Select the **Update** button.
-1. Select the link labeled *Frontend host*.
+1. Select the **No transform** option from the *Case transform* dropdown.
- When you select this link, you may see a 404 error if the site is not fully propagated. Instead of refreshing the page, wait a few minutes and return back to the *Overview* window and select the link labeled *Frontend host*.
+### Add an action
-1. From the *Overview* window, copy the value labeled **Front Door ID** and paste it into a file for later use.
+1. Select the **Add an action** dropdown.
+
+1. Select **Cache expiration**.
-> [!IMPORTANT]
-> By default, Azure Front Door configures [health probes](../frontdoor/front-door-health-probes.md) that may affect your traffic statistics. You may want to edit the default values for the [health probes](../frontdoor/front-door-health-probes.md).
+1. Select **Bypass cache** in the *Cache Behavior* dropdown.
+
+1. Select the **Save** button.
+
+### Associate rule to an endpoint
+
+Now that the rule is created, you apply the rule to a Front Door endpoint.
+
+1. Select the **Unassociated** link.
+
+1. Select the Endpoint name to which you want to apply the caching rule.
+
+1. Select the **Next** button.
+
+1. Select the **Associate** button.
+
+## Copy Front Door ID
+
+Use the following steps to copy the Front Door instance's unique identifier.
+
+1. Select the **Overview** link on the left-hand navigation.
+
+1. From the *Overview* window, copy the value labeled **Front Door ID** and paste it into a file for later use.
## Update static web app configuration
To complete the integration with Front Door, you need to update the application
- Restrict traffic to your site only through Front Door - Restrict traffic to your site only from your Front Door instance - Define which domains can access your site
+- Disable caching for secured routes
Open the [staticwebapp.config.json](configuration.md) file for your site and make the following changes.
Open the [staticwebapp.config.json](configuration.md) file for your site and mak
In this example, replace `my-sitename.azurefd.net` with the Azure Front Door hostname for your site.
+1. For all secured routes in your app, disable Azure Front Door caching by adding `"Cache-Control": "no-store"` to the route header definition.
+
+ ```json
+ {
+ "route": "/members",
+ "allowedRoles": ["authenticated, members"],
+ "headers": {
+ "Cache-Control": "no-store"
+ }
+ }
+ ```
+ With this configuration, your site is no longer available via the generated `*.azurestaticapps.net` hostname, but exclusively through the hostnames configured in your Front Door instance.
-> [!NOTE]
-> When you deploy updates to existing files in your static web app, Azure Front Door may continue to serve older versions of your files until their [time-to-live](https://wikipedia.org/wiki/Time_to_live) expires. [Purge the Azure Front Door cache](../frontdoor/front-door-caching.md#cache-purge) for the affected paths to ensure the latest files are served.
+## Considerations
+
+- **Custom domains**: Now that Front Door is managing your site, you no long use the Azure Static Web Apps custom domain feature. Azure Front Door has a separate process for adding a custom domain. Refer to [Add a custom domain to your Front Door](../frontdoor/front-door-custom-domain.md). When you add a custom domain to Front Door, you'll need to update your static web app configuration file to include it in the `allowedForwardedHosts` list.
+
+- **Traffic statistics**: By default, Azure Front Door configures [health probes](../frontdoor/front-door-health-probes.md) that may affect your traffic statistics. You may want to edit the default values for the [health probes](../frontdoor/front-door-health-probes.md).
+
+- **Serving old versions**: When you deploy updates to existing files in your static web app, Azure Front Door may continue to serve older versions of your files until their [time-to-live](https://wikipedia.org/wiki/Time_to_live) expires. [Purge the Azure Front Door cache](../frontdoor/front-door-caching.md#cache-purge) for the affected paths to ensure the latest files are served.
+
+## Clean up resources
-Now that Front Door is managing your site, you no long use the Azure Static Web Apps custom domain feature. Azure Front Door has a separate process for adding a custom domain. Refer to [Add a custom domain to your Front Door](../frontdoor/front-door-custom-domain.md). When you add a custom domain to Front Door, you'll need to update your static web app configuration file to include it in the `allowedForwardedHosts` list.
+If you no longer want to use the resources created in this tutorial, delete the Azure Static Web Apps and Azure Front Door instances.
## Next steps
synapse-analytics Security White Paper Introduction https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/synapse-analytics/guidance/security-white-paper-introduction.md
Azure Synapse data security and privacy are non-negotiable. The purpose of this
This white paper targets all enterprise security stakeholders. They include security administrators, network administrations, Azure administrators, workspace administrators, and database administrators.
-**Writers:** Vengatesh Parasuraman, Fretz Nuson, Ron Dunn, Khendr'a Reid, John Hoang, Nithesh Krishnappa, Mykola Kovalenko, Brad Schacht, Pedro Matinez, and Mark Pryce-Maher.
+**Writers:** Vengatesh Parasuraman, Fretz Nuson, Ron Dunn, Khendr'a Reid, John Hoang, Nithesh Krishnappa, Mykola Kovalenko, Brad Schacht, Pedro Matinez, Mark Pryce-Maher, and Arshad Ali.
**Technical Reviewers:** Nandita Valsan, Rony Thomas, Daniel Crawford, and Tammy Richter Jones.
synapse-analytics Resources Self Help Sql On Demand https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/synapse-analytics/sql/resources-self-help-sql-on-demand.md
Make sure that your storage is placed in the same region as serverless SQL pool,
The error *Incorrect syntax near 'NOT'* indicates that there are some external tables with the columns containing `NOT NULL` constraint in the column definition. Update the table to remove `NOT NULL` from the column definition. This error can sometimes also occur transiently with tables created from a CETAS statement. If the problem doesn't resolve, you can try dropping and recreating the external table.
+### Partitioning column returns NULL values
+
+If your query returns `NULL` values instead of partitioning columns or cannot find the partition columns, you have few possible troubleshooting steps:
+- If you are using tables to query partitioned data set, note that the tales do not support partitioning. Replace the table with the [partitioned views](create-use-views.md#partitioned-views).
+- If you are using the [partitioned views](create-use-views.md#partitioned-views) with the OPENROWSET that [queries partitioned files using the FILEPATH() function](query-specific-files.md), make sure that you have correctly specified wildcard pattern in the location that that you have used the proper index for referencing the wildcard.
+- If you are querying the files directly in the partitioned folder, note that the partitioning columns are not the parts of the file columns. The partitioning values are placed in the folder paths and not the files. Therefore, the files do not contain the partitioning values.
+ ### Inserting value to batch for column type DATETIME2 failed The error *Inserting value to batch for column type DATETIME2 failed* indicates that the serverless pool cannot read the date values form the underlying files. The datetime value stored in Parquet/Delta Lake file cannot be represented as `DATETIME2` column. Inspect the minimum value in the file using spark and check are there some dates less than 0001-01-03. If you stored the files using the Spark 2.4, the date time values before are written using the Julain calendar that is not aligned with the Gregorian Proleptic calendar used in serverless SQL pools. There might be a 2-days difference between Julian calendar user to write the values in Parquet (in some Spark versions) and Gregorian Proleptic calendar used in serverless SQL pool, which might cause conversion to invalid (negative) date value.
You should reload your legacy data with the higher version of Spark, and use the
spark.conf.set("spark.sql.legacy.parquet.int96RebaseModeInWrite", "CORRECTED") ```
+### Query failed because of a topology change or compute container failure
+
+This error might indicate that some internal process issue happened in the serverless SQL pool. File a support ticket with all necessary details that could help Azure support team to investigate the issue.
+
+Please specify in the support requests anything that might be unusual compared to the regular workload, such as large number of concurrent requests or some special workload or query that started executing before this error happened.
+ ## Configuration Serverless pools enable you to use T-SQL to configure database objects. There are some constraints, such as - you cannot create objects in master and lake house/spark databases, you need to have master key to create credentials, you need to have permission to reference data that is used in the objects.
If you are getting an error while trying to create new Azure AD login or user in
## Cosmos DB
-Serverless SQL pools enable you to query Cosmos DB analytical storage using the `OPENROWSET` function. Make sure that your Cosmos DB container has analytical storage. Make sure that you correctly specified account, database, and container name. also, make sure that you cosmos DB account key is valid - see [prerequisites](query-cosmos-db-analytical-store.md#prerequisites).
+Serverless SQL pools enable you to query Cosmos DB analytical storage using the `OPENROWSET` function. Make sure that your Cosmos DB container has analytical storage. Make sure that you correctly specified account, database, and container name. also, make sure that your Cosmos DB account key is valid - see [prerequisites](query-cosmos-db-analytical-store.md#prerequisites).
-### Cannot query CosmosDB using the OPENROWSET function
+### Cannot query Cosmos DB using the OPENROWSET function
-If you cannot connect to your Cosmos Db account, take a look at [prerequisites](query-cosmos-db-analytical-store.md#prerequisites). Possible errors and troubleshooting actions are listed in the following table.
+If you cannot connect to your Cosmos DB account, take a look at [prerequisites](query-cosmos-db-analytical-store.md#prerequisites). Possible errors and troubleshooting actions are listed in the following table.
| Error | Root cause | | | |
-| Syntax errors:<br/> - Incorrect syntax near `Openrowset`<br/> - `...` is not a recognized `BULK OPENROWSET` provider option.<br/> - Incorrect syntax near `...` | Possible root causes:<br/> - Not using CosmosDB as the first parameter.<br/> - Using a string literal instead of an identifier in the third parameter.<br/> - Not specifying the third parameter (container name). |
-| There was an error in the CosmosDB connection string. | - The account, database, or key isn't specified. <br/> - There's some option in a connection string that isn't recognized.<br/> - A semicolon (`;`) is placed at the end of a connection string. |
-| Resolving CosmosDB path has failed with the error "Incorrect account name" or "Incorrect database name." | The specified account name, database name, or container can't be found, or analytical storage hasn't been enabled to the specified collection.|
-| Resolving CosmosDB path has failed with the error "Incorrect secret value" or "Secret is null or empty." | The account key isn't valid or is missing. |
+| Syntax errors:<br/> - Incorrect syntax near `Openrowset`<br/> - `...` is not a recognized `BULK OPENROWSET` provider option.<br/> - Incorrect syntax near `...` | Possible root causes:<br/> - Not using Cosmos DB as the first parameter.<br/> - Using a string literal instead of an identifier in the third parameter.<br/> - Not specifying the third parameter (container name). |
+| There was an error in the Cosmos DB connection string. | - The account, database, or key isn't specified. <br/> - There's some option in a connection string that isn't recognized.<br/> - A semicolon (`;`) is placed at the end of a connection string. |
+| Resolving Cosmos DB path has failed with the error "Incorrect account name" or "Incorrect database name." | The specified account name, database name, or container can't be found, or analytical storage hasn't been enabled to the specified collection.|
+| Resolving Cosmos DB path has failed with the error "Incorrect secret value" or "Secret is null or empty." | The account key isn't valid or is missing. |
-### UTF-8 collation warning is returned while reading CosmosDB string types
+### UTF-8 collation warning is returned while reading Cosmos DB string types
A serverless SQL pool will return a compile-time warning if the `OPENROWSET` column collation doesn't have UTF-8 encoding. You can easily change the default collation for all `OPENROWSET` functions running in the current database by using the T-SQL statement `alter database current collate Latin1_General_100_CI_AS_SC_UTF8`.
Azure Synapse SQL will return `NULL` instead of the values that you see in the t
- Possibly wrong column name or path expression in the `WITH` clause. Column name (or path expression after the column type) in the `WITH` clause must match the property names in Cosmos DB collection. Comparison is case-sensitive (for example, `productCode` and `ProductCode` are different properties). Make sure that your column names exactly match the Cosmos DB property names. - The property might not be moved to the analytical storage because it violates some [schema constraints](../../cosmos-db/analytical-store-introduction.md#schema-constraints), such as more than 1000 properties or more than 127 nesting levels. - If you are using well-defined [schema representation](../../cosmos-db/analytical-store-introduction.md#schema-representation) the value in transactional store might have a wrong type. Well-defined schema locks the types for each property by sampling the documents. Any value added in the transactional store that doesn't match the type is treated as a wrong value and not migrated to the analytical store. -- If you are using full-fidelity [schema representation](../../cosmos-db/analytical-store-introduction.md#schema-representation) make sure that you are adding type suffix after property name like `$.price.int64`. If you don't see a value for the referenced path, maybe it is stored under different type path, for example `$.price.float64`. See [how to query Cosmos Db collections in the full-fidelity schema](query-cosmos-db-analytical-store.md#query-items-with-full-fidelity-schema).
+- If you are using full-fidelity [schema representation](../../cosmos-db/analytical-store-introduction.md#schema-representation) make sure that you are adding type suffix after property name like `$.price.int64`. If you don't see a value for the referenced path, maybe it is stored under different type path, for example `$.price.float64`. See [how to query Cosmos DB collections in the full-fidelity schema](query-cosmos-db-analytical-store.md#query-items-with-full-fidelity-schema).
### Column is not compatible with external data type The error *Column `column name` of the type `type name` isn't compatible with the external data type `type name`* is returned is the specified column type in the `WITH` clause doesn't match the type in the Azure Cosmos DB container. Try to change the column type as it's described in the section [Azure Cosmos DB to SQL type mappings](query-cosmos-db-analytical-store.md#azure-cosmos-db-to-sql-type-mappings), or use the `VARCHAR` type.
-### Resolving CosmosDB path has failed
+### Resolving Cosmos DB path has failed
-If you are getting the error: `Resolving CosmosDB path has failed with error 'This request is not authorized to perform this operation.'`, check do you use private endpoints in Cosmos DB. To allow SQL serverless to access an analytical store with private endpoint, you need to [configure private endpoints for Azure Cosmos DB analytical store](../../cosmos-db/analytical-store-private-endpoints.md#using-synapse-serverless-sql-pools).
+If you are getting the error: `Resolving Cosmos DB path has failed with error 'This request is not authorized to perform this operation.'`, check do you use private endpoints in Cosmos DB. To allow SQL serverless to access an analytical store with private endpoint, you need to [configure private endpoints for Azure Cosmos DB analytical store](../../cosmos-db/analytical-store-private-endpoints.md#using-synapse-serverless-sql-pools).
-### CosmosDB performance issues
+### Cosmos DB performance issues
If you are experiencing some unexpected performance issues, make sure that you applied the best practices, such as: - Make sure that you have placed the client application, serverless pool, and Cosmos DB analytical storage in [the same region](best-practices-serverless-sql-pool.md#colocate-your-azure-cosmos-db-analytical-storage-and-serverless-sql-pool).
If the data set is valid, [create a support ticket](../../azure-portal/supportab
Now you can continue using Delta Lake folder with Spark pool. You will provide copied data to Microsoft support if you are allowed to share this. Azure team will investigate the content of the `delta_log` file and provide more info about the possible errors and the workarounds.
-### Partitioning column returns NULL values
-
-**Status**: Resolved
-
-**Release**: August 2021
-
-### Column of type 'VARCHAR' is not compatible with external data type 'Parquet column is of nested type'
-
-**Status**: Resolved
-
-**Release**: October 2021
-
-### Cannot parse field 'type' in JSON object
-
-**Status**: Resolved
-
-**Release**: October 2021
-
-### Cannot find value of partitioning column in file
-
-**Status**: Resolved
-
-**Release**: November 2021
-
-### Resolving delta log on path ... failed with error: Cannot parse JSON object from log file
-
-**Status**: Resolved
-
-**Release**: November 2021
- ## Performance
-The serverless SQL pool assign the resources to the queries based on the size of data set and query complexity. You cannot impact or limit the resources that are provided to the queries. There are some cases where you might experience unexpected query performance degradations and identify the root causes.
+The serverless SQL pool assign the resources to the queries based on the size of data set and query complexity. You cannot change or limit the resources that are provided to the queries. There are some cases where you might experience unexpected query performance degradations and identify the root causes.
### Query duration is very long
Make sure that a user has permissions to access databases, [permissions to execu
You must use read-only Cosmos DB key to access your analytical storage, so make sure that it did not expire or that it is not re-generated.
-If you are getting the [Resolving Cosmos DB path has failed](#resolving-cosmosdb-path-has-failed) error, make sure that you configured firewall.
+If you are getting the [Resolving Cosmos DB path has failed](#resolving-cosmos-db-path-has-failed) error, make sure that you configured firewall.
### Cannot access Lakehouse/Spark database
Learn here how to [query Delta Lake files](query-delta-lake-format.md) with [nes
### Querying Cosmos DB data
-Learn here how to [query Cosmos DB analytical store](query-cosmos-db-analytical-store.md). You can use [online generator](https://htmlpreview.github.io/?https://github.com/Azure-Samples/Synapse/blob/main/SQL/tools/cosmosdb/generate-openrowset.html) to generate the `WITH` clause based on a sample Cosmos Db document.
+Learn here how to [query Cosmos DB analytical store](query-cosmos-db-analytical-store.md). You can use [online generator](https://htmlpreview.github.io/?https://github.com/Azure-Samples/Synapse/blob/main/SQL/tools/cosmosdb/generate-openrowset.html) to generate the `WITH` clause based on a sample Cosmos DB document.
You can [create views](create-use-views.md#cosmosdb-view) on top of Cosmos DB containers. ### Querying JSON data
synapse-analytics Tutorial Data Analyst https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/synapse-analytics/sql/tutorial-data-analyst.md
From the plot chart, you can see there's a weekly pattern, with Saturdays as the
Next, let's see if the drop in rides correlates with public holidays. We can see if there is a correlation by joining the NYC Taxi rides dataset with the Public Holidays dataset: ```sql
-WITH taxi_rides AS
-(
- SELECT
- CAST([tpepPickupDateTime] AS DATE) AS [current_day],
- COUNT(*) as rides_per_day
- FROM
- OPENROWSET(
- BULK 'https://azureopendatastorage.blob.core.windows.net/nyctlc/yellow/puYear=*/puMonth=*/*.parquet',
- FORMAT='PARQUET'
- ) AS [nyc]
- WHERE nyc.filepath(1) = '2016'
- GROUP BY CAST([tpepPickupDateTime] AS DATE)
+WITH taxi_rides AS (
+SELECT
+ CAST([tpepPickupDateTime] AS DATE) AS [current_day],
+ COUNT(*) as rides_per_day
+FROM
+ OPENROWSET(
+ BULK 'https://azureopendatastorage.blob.core.windows.net/nyctlc/yellow/puYear=*/puMonth=*/*.parquet',
+ FORMAT='PARQUET'
+ ) AS [nyc]
+WHERE nyc.filepath(1) = '2016'
+GROUP BY CAST([tpepPickupDateTime] AS DATE)
),
-public_holidays AS
-(
- SELECT
- holidayname as holiday,
- date
- FROM
- OPENROWSET(
- BULK 'https://azureopendatastorage.blob.core.windows.net/holidaydatacontainer/Processed/*.parquet',
- FORMAT='PARQUET'
- ) AS [holidays]
- WHERE countryorregion = 'United States' AND YEAR(date) = 2016
-)
+public_holidays AS (
+SELECT
+ holidayname as holiday,
+ date
+FROM
+ OPENROWSET(
+ BULK 'https://azureopendatastorage.blob.core.windows.net/holidaydatacontainer/Processed/*.parquet',
+ FORMAT='PARQUET'
+ ) AS [holidays]
+WHERE countryorregion = 'United States' AND YEAR(date) = 2016
+),
+joined_data AS (
SELECT
-*
+ *
FROM taxi_rides t LEFT OUTER JOIN public_holidays p on t.current_day = p.date
+)
+
+SELECT
+ *,
+ holiday_rides =
+ CASE
+ WHEN holiday is null THEN 0
+ WHEN holiday is not null THEN rides_per_day
+ END
+FROM joined_data
ORDER BY current_day ASC ``` ![NYC Taxi rides and Public Holidays datasets result visualization](./media/tutorial-data-analyst/rides-public-holidays.png)
-This time, we want to highlight the number of taxi rides during public holidays. For that purpose, we choose **none** for the **Category** column and **rides_per_day** and **holiday** as the **Legend (series)** columns.
+This time, we want to highlight the number of taxi rides during public holidays. For that purpose, we choose **current_day** for the **Category** column and **rides_per_day** and **holiday_rides** as the **Legend (series)** columns.
![Number of taxi rides during public holidays plot chart](./media/tutorial-data-analyst/plot-chart-public-holidays.png)