Okta Active Directory Agent Registration Fails With Unexpected Status Code 500 Error
Last Updated:
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.
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.
- 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. - 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>
