Cannot unmarshal string into Go struct field ManageAccessInput

Hi all,

I designed a workflow to remove all access from users’ Azure AD account for a specific use case. The workflow gets triggered on that case, starts and finished successfully. However, I see there are some errors during “Remove Access” step in the workflow.

“errorMessage”: “child workflow execution error (type: sp-child-workflow, workflowID: f52299d0-fa5a-4a57-a93b-492c5a924e4b-11, runID: c9b1e983-265a-49e7-944f-12f6fca98945, initiatedEventID: 51, startedEventID: 67): actionStep(Manage Access) Err: task failed: activity error (type: sp:access:manage, scheduledEventID: 5, startedEventID: 6, identity: fea68ec1-7749-4481-835f-74a17f63fa7b): json: cannot unmarshal string into Go struct field ManageAccessInput.requestedItems of type [x]infra.OutputAccessItem (type: Error Parsing Input, retryable: false): json: cannot unmarshal string into Go struct field ManageAccessInput.requestedItems of type [x]infra.OutputAccessItem (type: UnmarshalTypeError, retryable: true) (type: withStack, retryable: true): actionStep(Manage Access) Err: task failed: activity error (type: sp:access:manage, scheduledEventID: 5, startedEventID: 6, identity: fea68ec1-7749-4481-835f-74a17f63fa7b): json: cannot unmarshal string into Go struct field ManageAccessInput.requestedItems of type [x]infra.OutputAccessItem (type: Error Parsing Input, retryable: false): json: cannot unmarshal string into Go struct field ManageAccessInput.requestedItems of type [x]infra.OutputAccessItem (type: UnmarshalTypeError, retryable: true)”,

  •            "payload": ""*
    

I see a similar discussion and I understand that there was a bug and it is fixed by backend team. I wonder why the error persists if that is already fixed. Any help would be appreciated.

2 Likes

I am running into the same issue, along with a more general HTTP 400 error. Were you able to get this workflow to remove access as expected?

Not yet. I raised a ticket to support and now the engineering team is involved. When it is fixed, I will update here.

Hey Sahin,

A couple of things: 1) you should not need a for loop. Just input $.getAccess.accessItems into the Manage Access step.
2) I had to add a Wait step before my Get Access step as I was trying to remove roles on a lifecycle state change and the automatically deprovisioned roles were causing a race condition with my workflow removal operation.

Hopefully one of these suggestions can assist you.

Hey Dominick,

I know loop is required as workflow can remove one access at a time. I believe what fixed your problem is the wait step that you added. Furthermore, input $.getAccess.accessItems is already added in my manage access step.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.