Okta Access Gateway: Invalid API Token Server Error When Updating an App
Last Updated:
Overview
An attempt to update or save an application fails with a UI error:
This Event has been logged.
Server has encountered an error updating the application.
In the logs, the following error can also be seen:
code:E0000011, message:Invalid API Token, developerMessage:Valid API token still exists in Okta
Applies To
- Okta Access Gateway (OAG)
- Global Token Revocation (GTR)
- Okta Classic Engine
- Okta Identity Engine (OIE)
Cause
This will happen if the app was created under an IdP that uses the admin console URL for the Okta org URL (that is, company-admin.okta.com instead of company.okta.com).
There is a mention in the Configure IdP doc to not use the admin interface URL. However, this didn't prevent app creation under the IdP until OAG version 2025.3.0 when the GTR feature was added.
Now, OAG appends "-admin" to the IdP URL when making the API requests, specifically to set the GTR config in this case. This results in an API request to an invalid URL (that is, company-admin-admin.okta.com), which can be seen in the oag-admin logs if debug logging is enabled.
If the IdP URL does not contain "-admin", the API token is likely actually invalid, possibly due to not being refreshed or the account being suspended.
Solution
Recreate the applications under an IdP with a the correct Okta Org URL.
