NOTE*** I added multiple attachments throughout the post that I refer to but had to remove because new users are only allowed one attachment per post. I will try and add the attachments in this thread if possible. Thank you for your time!
I am in the process of creating a workflow that reassigns AP ownership and GG membership. The workflow triggers based off of an identities cloudlifecycle state going from active to inactive. I know there are several workflows posted in this community that do reassignment, but none of them fit my unique requirements so I decided to start from scratch. This hasn’t been fully ironed out and most of the actions I have used can be condensed, but I have kept them as is in fear of breaking what I already have working. The idea behind the workflow is to trigger off of an inactive identities’ cloud lifecycle state going from “Active” to “Inactive”. The issue I am running into is the loop input. I keep getting an error saying, “unexpected end of JSON input”. I have used this http request to grab a list of APs the inactive identity is an owner of: https://sailpoint.api.identitynow.com/beta/identities/:id/ownership.
Workflow:
The point of this workflow is to grab both AP ownership and GG membership and reassign to the identities direct manager. I am also emailing a link to the manager in the case they want this ownership assigned to someone else. I understand there are several instances that may mess up the logic of the workflow(Ex. Manager is inactive as well). Like I said before I am trying to get the basics of the workflow ironed out before I account for these kinds of issues
Background:
The http call works perfectly fine. I even had it working without hard coding the identity ID a couple of weeks back(using dynamic identity ID that changes based off of the identity triggering the workflow). I made sure to download the json script at the time. Tried uploading that exact same script and it doesn’t work anymore. I know the http returns the right info because I am able to use the json path and return a list of APs the identity owned as well as a list of GGs an identity was part of via email. I have linked screenshots with comments.
Grabbing AP ownership in list format (API call using postman):
Json Path Validator on the data returned by API call showing the IDs in list format:
Workflow implementation using this data. Emailing (instead of ID I used Name just for emailing purposes):
-Here is what the email looks like:
The loop input. The ID is hard coded for now, but I am trying to implement a way to use the trigger: {{$.trigger.identity.id}} in the json path:
^^The context I have set is for the http request in the loop that does the manager reassignment. I am certain this doesn’t affect the loop input at all.
Here is the error that it returns:
What I have tried:
-I have tried to hard code the ID into the json path. Which worked initially but leads me to the unexpected json input error as of the last 2 weeks. I know it is reading something because the loop returns 2 “unexpected end of json input” errors and I have set the specific test identity to own 2 APs.
- I have tried sending an email right before with hard coded and dynamic json path which returned the right AP ownership list(screenshot provided below). I have also tried using the json path validator to make sure that my path makes sense (screenshot above).
-I also tried using the define variable function, but that did absolutely nothing.
I have tried my best to search for any questions related to this topic, but I am having trouble finding something specific to passing a list of elements to a loop using a http request’s json path. Any help or insight will be greatly appreciated. Like I said I had it working perfectly fine about a month ago and after the dynamic variable implementation started failing, I was able to get it to work while hardcoding it. It looks like I am now back to square one. Any help is appreciated. Thanks!