<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
RDP Error "The remote server returned a (403) Forbidden"
Okta Classic Engine
Multi-Factor Authentication
Okta Identity Engine
Overview

This article reviews the RDP error below, found in the OktaWidget.log:

The remote server returned an error: (403) Forbidden

This error initially presents as a generic message in the UI when attempting to log in:

Multi Factor Authentication Failed
 

Generic Message 

If unaware of how to access the OktaWidget.log file to troubleshoot errors, please refer to the parent article Troubleshooting Okta MFA Credential Provider RDP Errors.

The full error usually appears as:

 

exception thrown is = System.Net.WebException: The remote server returned an error: (403) Forbidden.<CR><LF>   at System.Net.HttpWebRequest.GetResponse()<CR><LF>   at OktaWidget.JwtService.GetStateTokenUsingJwt(String username)<CR><LF>   at OktaWidget.OktaWidgetForm..ctor(String username, Int64 parent, Int64 widgetFlow)<CR><LF>   at OktaWidget.OktaWidgetClass.displayWidget(Int64 parent, String username, Int64 flow)

 
error
 
Applies To
  • Okta MFA Credential Provider
  • Remote Desktop Protocol (RDP)
Cause

The HTTP status code 403 (Forbidden) indicates that the server understood the request but refuses to fulfill it. For authentication, this means that credentials were provided in the request but are considered insufficient to grant access.

There are a couple of known reasons for this error message occurring in the OktaWidget.log, including:

  • The user does not have MFA configured.
    • If Multi-Factor Authentication is required on the RDP Application, as it is by default, but the end-user has not enrolled in a factor.
  •  The Enrollment Policy specifies the server in a Network zone, which results in a deny condition.  
    • If Enrollment Policies specify Network Zones and the server is connecting to Okta from an IP address, this results in a deny, or can result in logins being denied and logged as The remote server returned an error: (403) Forbidden.
    • During login, when MFA is required, Okta will query the Enrollment Policy configuration for which authenticators should be available based on the context of the user, which can be configured to trigger based on network zones. 
  • The user is not assigned to the RDP app.
Solution

The user does not have MFA configured

This situation occurs commonly when a new user attempts to access the server via RDP or has to log into their Okta Dashboard and enroll an authenticator for MFA.

If they are not automatically prompted to enroll at the dashboard login, they may enroll by accessing account settings from the dashboard:

  1. Log in to the Okta Dashboard.
  2. If MFA is required, set up an MFA factor when logging in.
  3. If MFA is not required to access the dashboard, click the user name in the upper right corner and choose Settings.
  4. From the account settings page, find Security Methods and set up an appropriate authenticator


Enrollment Policy specifies server in a Network zones which results in a deny condition  


Reference the IP address in the login event.

NOTE: If this is the root cause, the Primary Authentication will show success in the system logs, and it is necessary to reference the IP address and Zone:

System logs


As configured, if IP [IP Address.253] is not listed in a zone, the login will be denied with an HTTP 403.

Enrollment policies and rules 

As configured above, the IP address would need to be listed in a network zone to be allowed in the enrollment policy rule. Alternatively, the enrollment policy could be adjusted to remove network zones. 
 

The user is not assigned to the RDP app

Make sure the user attempting access is assigned to the RDP App from the Okta Admin Console:

  1. Log in to the Okta Admin Console.
  2. Navigate to Applications > Applications. Select the RDP App Microsoft RDP (MFA).
  3. Click the Assignments tab, click the Assign button, and choose to assign the app to the correct person or group.
Microsoft RDP (MFA)

 

Related References

Recommended content

Loading
RDP Error "The remote server returned a (403) Forbidden"