How to Create a Custom Error Page in Azure AD B2C | Custom Policies

孤街醉人 提交于 2019-12-24 01:42:47

问题


When using custom policies, how can I specify the error page for a <UserJourney>? Based on the values in the TFP base xml file, I would have thought it would be <RecoveryUri> but that is not working.

<ContentDefinition Id="api.signuporsignin-ext-local">
    <!-- <LoadUri>~/tenant/default/unified.cshtml</LoadUri> -->
    <LoadUri>https://localhost:44377/</LoadUri>
    <!-- <RecoveryUri>~/common/default_page_error.html</RecoveryUri> -->
    <RecoveryUri>https://localhost:44377/Home/Error</RecoveryUri>
    <DataUri>urn:com:microsoft:aad:b2c:elements:unifiedssp:1.0.0</DataUri>
    <Metadata>
        <Item Key="DisplayName">Signin and Signup</Item>
    </Metadata>
</ContentDefinition>

Current Result:


回答1:


You would want to update the api.error content definition:

<!-- This content definition is to render an error page that displays unhandled errors. -->
<ContentDefinition Id="api.error">
  <LoadUri>~/tenant/default/exception.cshtml</LoadUri>
  <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
  <DataUri>urn:com:microsoft:aad:b2c:elements:globalexception:1.1.0</DataUri>
  <Metadata>
    <Item Key="DisplayName">Error page</Item>
  </Metadata>
</ContentDefinition>


来源:https://stackoverflow.com/questions/46798311/how-to-create-a-custom-error-page-in-azure-ad-b2c-custom-policies

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!