自定义 AD FS 登录页面的错误消息

可以对你的组织配置可以定制的自定义错误消息。 下图显示了自定义的错误页面描述和一般错误消息。 使用以下 Windows PowerShell cmdlet 自定义错误消息。

custom error

自定义错误页面描述

若要自定义错误页面描述,请使用以下 Windows PowerShell cmdlet 和语法。

Set-AdfsGlobalWebContent -ErrorPageDescriptionText "This is Contoso's error page description"

自定义一般错误消息

若要自定义一般错误消息,请使用以下 Windows PowerShell cmdlet 和语法。

Set-AdfsGlobalWebContent -ErrorPageGenericErrorMessage "This is a generic error message.  Contact Contoso IT for assistance."

自定义授权错误消息

若要自定义授权错误消息,请使用以下 Windows PowerShell cmdlet 和语法。

Set-AdfsGlobalWebContent -ErrorPageAuthorizationErrorMessage "You have received an Authorization error.  Contact Contoso IT for assistance."

自定义设备身份验证错误消息

若要自定义设备身份验证错误消息,请使用以下 Windows PowerShell cmdlet 和语法。

Set-AdfsGlobalWebContent -ErrorPageDeviceAuthenticationErrorMessage "Your device is not authorized.  Contact Contoso IT for assistance."

自定义支持通过电子邮件错误消息

可以在 AD FS 中配置支持电子邮件地址。 如果已配置,AD FS 会自动显示一个链接,以便最终用户能够通过电子邮件发送错误详细信息。

若要自定义支持电子邮件错误消息,请使用以下 Windows PowerShell cmdlet 和语法。

Set-AdfsGlobalWebContent -ErrorPageSupportEmail  "admin@contoso.com"

自定义信赖方授权消息

可以在 AD FS 中配置信赖方授权错误消息。

若要自定义信赖方错误消息,请使用以下 Windows PowerShell cmdlet 和语法。

Set-AdfsRelyingPartyWebContent -Name fedpassive -ErrorPageAuthorizationErrorMessage "<p> You need to be a member of Security Auditors to access this site. Click <A href='http://accessrequest/'>here</A> for more information.</p>"

其他参考

AD FS 用户登录自定义