Service Graph Connector for Armis import fails – "Get Armis Token" stream returns an extra null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Problem
Our daily Service Graph Connector for Armis import started failing with this error: "Could not retrieve token. Please make sure your connection record is properly configured." Nothing had changed on our side. Armis support confirmed their API returns only one token.
When we ran the Get Armis Token data stream action manually, it returned 2 output items. The first was null and the second had a valid token. Some days the job worked, some days it failed.
What we checked (and ruled out)
- Duplicate connection or credential records: there was only one of each.
- The action running twice: the Outbound HTTP log showed only one HTTP call per run.
- Store app upgrade: the latest version has the same logic.
Root cause
In the Get Armis Token action, the Splitter step uses Item Path $ (the response root). The Armis response has two root keys:
{ "data": { "access_token": "...", "expiration_utc": "..." },
"success": true }So the splitter creates two items, one for data and one for success. The Script Parser fills the outputs only when a token exists, but it never skips the other item. That item goes out as an empty (null) item.
The order of the two items follows the JSON key order in the Armis response. When that order changed, the null item moved to position 0. The consumer reads item [0], finds no token, and the import fails. This explains the "works some days, fails other days" pattern.
Solution
- In Flow Designer, open the Get Armis Token data stream action.
- Leave the Splitter Item Path as $.
- In the Script Parser step, add an else branch that skips items with no token.
- Save and publish the action.
- Test it. You should see Page 1 / Item 1 / Error 0 and a valid token.
- Run the Armis scheduled import and check that the import sets load rows.
Script Parser outline
// read the current item // if item has access_token // set outputs (token, expiry) // else // outputs.state = 'SKIP' // drop the non-token item
Things that did NOT work
- Changing Item Path to $.data. The JSON splitter iterates the object's members, so it splits data into single values and returns 0 items.
- Upgrading the Service Graph Connector for Armis alone. The parser logic was unchanged.
Tips
- When we removed the SKIP again, the failure came straight back. So SKIP is the real fix.
- Data streams called from a script run lazily. A context showing 0 ms / 0 pages is not an error by itself.
- Don't run DEV and PROD Armis imports at the same time with the same Armis API secret key, because parallel runs cancel each other. Use a separate key or offset the schedules.
- This is a customisation of a store app action. Make a note of it for future upgrades.
Hope this helps anyone facing the same Armis token error. Happy to share more details if needed.
