I have about 130 roles I wish to add an entitlement to. They all have a common term in their name, so I used a powershell script to filter out all the appropriate roles and their ID numbers.
After that, my plan was to use the PATCH role Beta API call (patch-role | SailPoint Developer Community) to add the entitlement. I wanted to test in sandbox first so I attempted it with 3 role ID’s, and upon failing with 1 role ID, which failed again.
I made sure all the entitlements and roles involves are enabled. Are there any other configurations for the roles and entitlement I need ot worry about?
Hi Suresh,
I was able to add the “Content-Type application/json-patch+json” to my headers and now the call appears to return a 200 OK code, but when I check the role the entitlement does not appear to have been added.
I accidentally copied in the Source ID from the entitlements json object…I’m stupid. I didn’t realize the entitlement ID was at the bottom. It appears to be working now. I’ve only tested with one role though.
Thanks so much. I appear to have hit another issue though. I am using “Bulk Edits” in the path variables (Params) fields to input the roles I want to edit, but it’s only editing the last listed role:
My understanding is that PATCH a specific role API will apply to an ID not to multiple IDs, that is the reason the API considering only the last ID and updating it from your bulk path param list. So, you need to set the path param dynamically to get the Role IDs and execute the PATCH operation for each role by using pre-request scripts. You can get the Postman documentation by searching “set-path-param-dymanically” and mostly it will be a few lines of code.
Thank you Suresh, that’s what the documentation makes it sound like too. You’ve been super helpful! I will look into the dynamic path parameters. A coworker advised me to try a powershell script to make the api calls and loop through the ID numbers from a CSV file. I will keep playing around until I figure it out.
Hey Sandeep,
I am looking over the documentation and it doesn’t seem very clear for someone at my skill level. I could probably figure it out if I spent a few days on it, but I think I will do them one at a time via API calls for now. I am always practicing my coding, but I’m not too familiar with Ruby and kind of a beginner. I look forward to trying this out in the future though.
Thanks for your input and making me aware of the bulk role editor!