From account activity get recipient id in workflow loop variable

I have created a workflow that searches in ISC for account activity and identifies Active Directory accounts enabled within the last hour. It then sends an email notification to the managers of those users.

However, I’m encountering an error related to the loop variable.**
“errorMessage”: “expected top-level JSON object in string, got array without attribute wrapper (type: Error Parsing Activity Output, retryable: false)”,


Workflow_AccountActivity.json (4.9 KB)

Hi @Ankit_002,

In your Get Identity action, can you replace $.loop1.loopInput with $.loop.loopInput.recipient.id and see if it fixes the error.

It’s seem working with this workflow but when I merge and executed in my actual workflow then getting same error again. Here I have uploaded my actual workflow for reference.
ScheduleTriggerNotifyManagerBirthrightAccessGranted20250606.json (5.9 KB)

Hi @Ankit_002,

Can you try to rebuild this WF from the start using the workflow builder and see if it works.

I replicated your WF in my tenant and got the same error. But when I re-created it, the error was resolved. Maybe something is wrong in the JSON file.

Hi Jesvin,

I tried the same approach, but it didn’t work for me. It seems there’s an issue with using two loops in a single workflow. To work around this, I created two separate workflows to achieve the desired result.

Thanks for you help.

Interesting.

This works for me

And looking at the KB Article here, WF’s do support multiple loops.

In my case, there are two HTTP actions—one returns identities and the other returns account activities. Both results are processed using separate loops.
I noticed that while the first loop executes correctly, the second loop throws an error when it starts.