AD FS 登入頁面自訂的錯誤訊息Custom error messages for AD FS sign-in page

適用於:Windows Server 2016、Windows Server 2012 R2Applies To: Windows Server 2016, Windows Server 2012 R2

您可以設定可以量身打造的自訂的錯誤訊息到您的組織。You can configure custom error messages that can be tailored to your organization. 下圖顯示自訂的錯誤頁面描述與一般錯誤訊息。The following illustration shows a customized error page description and a generic error message. 使用下列的 Windows PowerShell cmdlet 來自訂您的錯誤訊息。Use the following Windows PowerShell cmdlets to customize your error messages.

自訂錯誤

自訂錯誤碼頁面Customize the error page description

若要自訂錯誤碼頁面上,使用下列 Windows PowerShell cmdlet 和語法。To customize the error page description, use the following Windows PowerShell cmdlet and syntax.

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

自訂的一般錯誤訊息Customize a generic error message

若要自訂的一般錯誤訊息,請使用下列 Windows PowerShell cmdlet 和語法。To customize the generic error message, use the following Windows PowerShell cmdlet and syntax.

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

自訂授權錯誤訊息Customize an authorization error message

若要自訂授權錯誤訊息,請使用下列 Windows PowerShell cmdlet 和語法。To customize the authorization error message, use the following Windows PowerShell cmdlet and syntax.

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

自訂裝置驗證錯誤訊息Customize a device authentication error message

若要自訂裝置驗證錯誤訊息,請使用下列 Windows PowerShell cmdlet 和語法。To customize the device authentication error message, use the following Windows PowerShell cmdlet and syntax.

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

來自訂郵件錯誤訊息的支援Customize a support email error message

您可以設定 AD FS 支援電子郵件地址。You can configure a support email address in AD FS. 如果設定,AD FS 自動顯示以電子郵件傳送的錯誤的詳細資料終端使用者的連結。If configured, AD FS automatically shows a link for end users to email the error details.

若要自訂支援的電子郵件的錯誤訊息,請使用下列 Windows PowerShell cmdlet 和語法。To customize the support email error message, use the following Windows PowerShell cmdlet and syntax.

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

自訂信賴的派對授權訊息Customize a relying party authorization message

您可以設定 AD FS 信賴的派對授權錯誤訊息。You can configure a relying party authorization error message in AD FS.

若要自訂信賴廠商錯誤訊息,請使用下列 Windows PowerShell cmdlet 和語法。To customize the relying party error message, use the following Windows PowerShell cmdlet and syntax.

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>“  

其他參考資料Additional references

AD FS 使用者登入自訂AD FS User Sign-in Customization