Enable the AI agent feature of the environment (POST /environment/aiagent?_action=enable), the action behind the
"enable" button of the Admin UI.
What it does, as far as it was observed on Advanced Identity Cloud tenants (frodo-lib#1060): the platform installs
the IDM feature aiagent internally, then writes the OAuth 2.0 provider of every realm (alpha and bravo) with
the AI agent settings. AM validates that write, so the action fails with a generic HTTP 500, which says nothing
about the reason, if a realm has no OAuth 2.0 provider or a provider has no password grant authentication
service. The effect on AM (the agent type AIAgent, until then answering 501 OAuth 2.0 for AI Agents is not enabled) can take minutes after the action answered 200: poll before judging the result.
Do not call it on a tenant whose definitions of the feature are present but not equal to the original (the
registry reads installedVersion: null although the feature was installed before): the internal install would
add them a second time. diagnoseIdmFeature('aiagent') finds out whether that is the case, and
repairIdmFeature runs this action when it is safe.
On failure the error is a FrodoError that keeps the HTTP status (httpStatus) and the
x-forgerock-transactionid of the response (httpTransactionId), which finds the request in the platform's
logs.
Returns Promise<any>
a promise that resolves to an empty result object if successful
Enable the AI agent feature of the environment (
POST /environment/aiagent?_action=enable), the action behind the "enable" button of the Admin UI.What it does, as far as it was observed on Advanced Identity Cloud tenants (frodo-lib#1060): the platform installs the IDM feature
aiagentinternally, then writes the OAuth 2.0 provider of every realm (alpha and bravo) with the AI agent settings. AM validates that write, so the action fails with a generic HTTP 500, which says nothing about the reason, if a realm has no OAuth 2.0 provider or a provider has no password grant authentication service. The effect on AM (the agent typeAIAgent, until then answering501 OAuth 2.0 for AI Agents is not enabled) can take minutes after the action answered 200: poll before judging the result.Do not call it on a tenant whose definitions of the feature are present but not equal to the original (the registry reads
installedVersion: nullalthough the feature was installed before): the internal install would add them a second time.diagnoseIdmFeature('aiagent')finds out whether that is the case, andrepairIdmFeatureruns this action when it is safe.On failure the error is a
FrodoErrorthat keeps the HTTP status (httpStatus) and thex-forgerock-transactionidof the response (httpTransactionId), which finds the request in the platform's logs.