I have a workflow that I have configured to remove roles upon moving to the inactive lifecycle state.
However, it appears that my workflow is failing within the loop step with the error message containing “child workflow execution error task failed: activity error. request failed: 400 - 400 Bad Request. type: sp:access:manage.” I have cross referenced with another workflow here and verified that mine is similar. Does anyone know what I am doing incorrectly in my workflow configuration?
{
"name": "Remove Access - Lifecycle State moved to Inactive",
"description": "",
"definition": {
"start": "Get Identity",
"steps": {
"Compare Strings": {
"choiceList": [
{
"comparator": "StringEquals",
"nextStep": "Get Access",
"variableA.$": "$.trigger.changes[?(@.attribute == 'cloudLifecycleState')].newValue",
"variableB": "inactive"
}
],
"defaultStep": "End Step — Success",
"displayName": "Lifecycle State is inactive?",
"type": "choice"
},
"End Step — Success": {
"type": "success"
},
"Get Access": {
"actionId": "sp:access:get",
"attributes": {
"accessprofiles": false,
"entitlements": false,
"getAccessBy": "specificIdentity",
"identityToReturn.$": "$.getIdentity.id",
"roles": true
},
"displayName": "Get Roles",
"nextStep": "Loop",
"type": "action",
"versionNumber": 1
},
"Get Identity": {
"actionId": "sp:get-identity",
"attributes": {
"id.$": "$.trigger.identity.id"
},
"description": "Get the identity whose lifecycle state changed",
"nextStep": "Compare Strings",
"type": "action",
"versionNumber": 2
},
"Loop": {
"actionId": "sp:loop:iterator",
"attributes": {
"input.$": "$.getAccess.accessItems",
"start": "Manage Access",
"steps": {
"End Step - Success": {
"displayName": "",
"type": "success"
},
"Manage Access": {
"actionId": "sp:access:manage",
"attributes": {
"comments": "User is now inactive, removing all roles.",
"removeDuration": null,
"removeIdentity.$": "$.getIdentity.id",
"requestType": "REVOKE_ACCESS",
"requestedItems.$": "$.loop.loopInput"
},
"displayName": "Remove Roles",
"nextStep": "End Step - Success",
"type": "action",
"versionNumber": 1
}
}
},
"displayName": "",
"nextStep": "End Step — Success",
"type": "action",
"versionNumber": 1
}
}
},
"creator": {
"type": "IDENTITY",
"id": "",
"name": ""
},
"trigger": {
"type": "EVENT",
"attributes": {
"attributeToFilter": "cloudLifecycleState",
"description": "Triggers when cloudLifecycleState identity attributes change.",
"filter.$": "$.changes[?(@.attribute == \"cloudLifecycleState\")]",
"id": "idn:identity-attributes-changed"
}
}
}