<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 Active Directory Agent Registration Fails With Unexpected Status Code 500 Error

Okta Classic Engine
Directories
Okta Identity Engine

Overview

Okta blocks Active Directory (AD) agent registration when a duplicate AD application instance exists. Removing the duplicate inactive directory instance resolves the issue. When attempting to register the Okta AD agent, the installation fails and generates the following error:

 

Error registering agent: Unexpected status code 500 InternalServerError for URL https://<subdomain>.okta.com/api/1/internal/app/activedirectory/

 

The following image shows the unexpected 500 error encountered during the Okta AD agent registration process.

Okta AD agent error message

Applies To

  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • Directories
  • Active Directory (AD) Agent
  • Lightweight Directory Access Protocol (LDAP) Agent

Cause

Okta blocks agent registration when a duplicate AD application instance exists in the environment.

Solution

How is the duplicate inactive Active Directory instance removed?

Navigate to the Directory Integrations page in the Okta Admin Console, select the inactive directory, and delete the duplicate instance.

  1. On the Directory Integrations page, select the directory in the Inactive list.

    The following images display the inactive directory list and the specific inactive AD instance selection.
    Directory integrations
    AD
  2. Select the dropdown menu next to Inactive at the top of the window and choose Delete.

 

 

How is the duplicate Active Directory instance removed using the Okta API?

Verify and remove the duplicate AD instance ID by executing the following API commands.

  • Verify the AD instance via the API:
    GET /api/v1/apps/<duplicate AD instance Id>
  • Remove the duplicate AD instance ID via the API:
    DELETE /api/v1/apps/<duplicate AD instance Id>
Loading
Okta Support - Okta Active Directory Agent Registration Fails With Unexpected Status Code 500 Error