AD FS 登入頁面的自訂錯誤訊息

您可以設定自訂錯誤訊息,以符合組織需求。 下圖顯示自訂的錯誤頁面描述,以及一般錯誤訊息。 使用下列 Windows PowerShell 自訂您的錯誤訊息。

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 使用者登入自訂