Aria Automation deployments created through the GUI succeed, but those which are run from the REST API failed with 404 error, "Session token not found"
search cancel

Aria Automation deployments created through the GUI succeed, but those which are run from the REST API failed with 404 error, "Session token not found"

book

Article ID: 373247

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Deployments started by API failing due to Orchestrator session token error. Users may see these errors:

Extensibility triggered task failed. Event ID: <UUID>. Failure: Extensibility error received for topic compute.allocation.pre, eventId = '<UUID>': [10040] SubscriberID: vro-gateway-<pod-id>, RunnableID: <UUID> and SubscriptionID: sub_<subID> failed with the following error: com.vmware.automation.vro.gateway.common.RemoteVroGatewayException: Automation Orchestrator Gateway received error 404 NOT_FOUND for request: /sessions/exchange error: {"timestamp":"2024-01-23T08:12:34.567+0000","path":"/session-service/api/sessions/exchange","status":404,"error":"Not Found","message":"404 NOT_FOUND \"Session token not found\"","requestId":"<reqID>","@type":"org.springframework.web.server.ResponseStatusException"}

 

Environment

VMware Aria Automation 8.x

Cause

The correct two-stage authentication process needs to be followed as in the documentation

Resolution

The current procedure is a two-step login, where the refresh token is first requested from "$url/csp/gateway/am/api/login?access_token" which is then used to get the bearer token.

Please see the following docs article for details:

https://docs.vmware.com/en/VMware-Aria-Automation/8.18/automation-api-programming-guide/GUID-AC1E4407-6139-412A-B4AA-1F102942EA94.html