When a connector is accidentally removed or deleted in VMware Identity Manager, it needs to be restored and activated through the API. This article outlines the steps to obtain the necessary tokens, activate the connector, and integrate it within the VMware Identity Manager.
Note: It is recommended to use this method due to the complexity of using Postman or curl.
connector.sh attached on the KB and upload it to Aria Suite Lifecycle appliance as it has jq and curl utilities preinstalled."chmod +x connector.sh" and run the script using the command "./connector.sh". Make a POST request to the following URL to acquire the HZN session token.
URL: https://<VIDM Node FQDN>/SAAS/API/1.0/REST/auth/system/login
Method: POST
Headers:
Accept: application/json; charset=utf-8
Content-Type: application/json
Example Request Body:
{
"username": "admin",
"password": "adminpassword",
"issueToken": "true"
}
Example Response:
{
"id": null,
"sessionToken": "eywxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...",
"firstName": null,
"lastName": null,
"admin": false
}
Once you have the HZN token, use it in the Authorization header of the following API call to activate the connector.
URL:
POST https://<connectorHost>:8443/hc/API/1.0/REST/connectormanagement/connector/activate/
Headers:
Content-Type: application/vnd.vmware.horizon.manager.connector.management.activate.connector+json
Authorization: HZN <token from Step 1>
Body:
{
"activationToken":"ID5",
"adminPassword":"ID6",
"gatewayHostname":"ID7"
}
Success Response Status: A status of 200 OK indicates success.
Sample Response:
{
"isSuccess":true,
"redirectUrl":"<connector worker URL>",
"message":"Successfully activated the Connector.",
"tenantStateId":{"tenant":"<Tenant Id>","connector":"<connector worker Id>"}
}
Alternatively, you can use the following cURL command. Replace the ID placeholders using the legend below.
curl --location 'https://ID1:8443/hc/API/1.0/REST/connectormanagement/connector/activate/' \
--header 'Authorization: HZN ID2' \
--header 'Content-Type: application/vnd.vmware.horizon.manager.connector.management.activate.connector+json' \
--header 'Accept: application/json' \
--header 'Cookie: JSESSIONID=ID3; trutid=ID4' \
--data '{
"activationToken":"ID5",
"adminPassword":"ID6",
"gatewayHostname":"ID7"
}'
Legend: