<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

Okta Provisioning Fails With Error "Bad Gateway Errors reported by remote server Invalid JSON

API Access Management

Overview

An automatic provisioning failure occurs in Okta when a remote server returns an HTTP 502 Bad Gateway response instead of a valid JSON payload. Resolve this issue by verifying the downstream application status, inspecting the backend logs, and re-attempting the provisioning task in the Okta Admin Console. 

 

When this occurs, Okta displays the following error message in the Okta Admin Console.

Automatic provisioning of user to app <app_name> failed: Error while creating user <user>: Bad Gateway. Errors reported by remote server: Invalid JSON: Unrecognized token 'error': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') at [Source: REDACTED StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: <line number>, column: <column number>]

 

Error

Applies To

  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • Provisioning
  • System for Cross-domain Identity Management (SCIM)

Cause

The remote server host for the target application returns an HTTP 502 Bad Gateway response (such as an HTML error page or an unparsed plain text response starting with error) instead of a valid JSON payload expected by Okta. This occurs due to backend maintenance, service outages, or API server routing issues on the downstream application side.

Solution

How is the Bad Gateway Invalid JSON error resolved during Okta provisioning?

Reach out to the application owner to help verify the downstream application status, inspect the backend logs, and retry the provisioning task in the Okta Admin Console.

  1. Verify if the application is undergoing maintenance or experiencing an outage during the time of the failure.
  2. Check the logs on the SCIM server side for that specific timestamp to identify why the server is unable to reach the backend service.
  3. Retry the provisioning task manually in the Okta Admin Console once the downstream service is healthy.

 

Loading
Okta Support - Okta Provisioning Fails With Error "Bad Gateway Errors reported by remote server Invalid JSON