пятница, 19 февраля 2021 г.

Быстрые заметки #2: Azure B2C custom policies

Если пытаться переопределись поведение для  PasswordReset или ProfileEdit User Journeys, поместив изменённый journey в TrustedFrameworkExtensions.xml, то можно столкнуться с ошибкой ниже:

Validation failed: 2 validation error(s) found in policy "B2C_1A_TRUSTFRAMEWORKEXTENSIONS" of tenant "myTenant.onmicrosoft.com".User journey "ProfileEdit" in policy "B2C_1A_TrustFrameworkExtensions" of tenant "myTenant.onmicrosoft.com" has step 3 with 2 claims exchanges. It must be preceded by a claims provider selection in order to determine which claims exchange can be used.User journey "ProfileEdit" in policy "B2C_1A_TrustFrameworkExtensions" of tenant "myTenant.onmicrosoft.com" has step 4 with 2 claims exchanges. It must be preceded by a claims provider selection in order to determine which claims exchange can be used.User journey "ProfileEdit" in policy "B2C_1A_TrustFrameworkExtensions" of tenant "myTenant.onmicrosoft.com" has step 3 with 2 claims exchanges. It must be preceded by a claims provider selection in order to determine which claims exchange can be used.User journey "ProfileEdit" in policy "B2C_1A_TrustFrameworkExtensions" of tenant "myTenant.onmicrosoft.com" has step 4 with 2 claims exchanges. It must be preceded by a claims provider selection in order to determine which claims exchange can be used.

Возникает она из-за того, что journey с аналогичным именем присутствует в TrustedFrameworkBase.xml.

Чтобы ошибка ушла переименуйте user journey в TrustedFrameworkExtensions.xml и Relying party policy.

Такой подход позволит сохранить user journeys, доступные по умолчанию, но и получить желаемое поведение от модифицированного. 

Комментариев нет:

Отправить комментарий

Уважаемый коллега, Ваш комментарий пройдёт модерацию, чтобы избежать спам-атак в ленте. Спасибо за понимание.