# Cannot unmarshal string into Go struct field ManageAccessInput

**URL:** <https://developer.sailpoint.com/discuss/t/cannot-unmarshal-string-into-go-struct-field-manageaccessinput/62836>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, connectors, sailpoint-identity-security, provisioning\
**Created:** [June 5, 2024, 1:16pm UTC](https://developer.sailpoint.com/discuss/t/cannot-unmarshal-string-into-go-struct-field-manageaccessinput/62836 "2024-06-05T13:16:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahincelik](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@sahincelik](https://developer.sailpoint.com/discuss/u/sahincelik)\
**Post date:** [June 5, 2024, 1:16pm UTC](https://developer.sailpoint.com/discuss/t/cannot-unmarshal-string-into-go-struct-field-manageaccessinput/62836/1 "2024-06-05T13:16:54Z")

</div>

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.

 ![capture](https://global.discourse-cdn.com/sailpoint/original/2X/0/07df118c704af6006202c5f57a70347735c5768f.png)

_“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](https://developer.sailpoint.com/discuss/t/saas-workflows-error-json-cannot-unmarshal-string-into-go-struct-field-manageaccessinput-addidentities-of-type-string/5034) 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.

---

<div class="post-metadata">

**Author:** ![dominick-miller](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/dominick-miller/32/29002_2.png) [@dominick-miller](https://developer.sailpoint.com/discuss/u/dominick-miller)\
**Post date:** [June 13, 2024, 8:11pm UTC](https://developer.sailpoint.com/discuss/t/cannot-unmarshal-string-into-go-struct-field-manageaccessinput/62836/2 "2024-06-13T20:11:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sahincelik](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@sahincelik](https://developer.sailpoint.com/discuss/u/sahincelik)\
**Post date:** [June 18, 2024, 2:02pm UTC](https://developer.sailpoint.com/discuss/t/cannot-unmarshal-string-into-go-struct-field-manageaccessinput/62836/3 "2024-06-18T14:02:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dominick-miller](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/dominick-miller/32/29002_2.png) [@dominick-miller](https://developer.sailpoint.com/discuss/u/dominick-miller)\
**Post date:** [June 18, 2024, 2:18pm UTC](https://developer.sailpoint.com/discuss/t/cannot-unmarshal-string-into-go-struct-field-manageaccessinput/62836/4 "2024-06-18T14:18:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sahincelik](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@sahincelik](https://developer.sailpoint.com/discuss/u/sahincelik)\
**Post date:** [June 20, 2024, 7:32am UTC](https://developer.sailpoint.com/discuss/t/cannot-unmarshal-string-into-go-struct-field-manageaccessinput/62836/5 "2024-06-20T07:32:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [August 19, 2024, 7:32am UTC](https://developer.sailpoint.com/discuss/t/cannot-unmarshal-string-into-go-struct-field-manageaccessinput/62836/6 "2024-08-19T07:32:36Z")

</div>

Closed on August 19, 2024, 7:32am UTC

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