NERM bulk update functionality

Hi is there any native functionality on NERM that allows for bulk updates to be run on assignment attributes via the frontend?

Batch Workflows can be used in NERM to update a selection of Profiles based on a given set of condition criteria (the Batch Workflow’s “Scope”): Managing Lifecycle Workflows - SailPoint NERM Admin Help

The workflow would have to be configured on the Admin side to perform the actions you want. As an example, lets say you want to update Assignments with a new End Date:

  • The Scope would be set to “Profile Type equals Assignments”
  • Set the “Create a new request for each profile selected” Radio button to “No”- as we want the same update to occur on all selected Profiles
  • The Action(s) in the workflow could be as simple as a Set Attribute Values action with the new end data dynamically or statically set. OR, you could add a Request form for a Page with the “End Date” attribute out it so the User can pick a specific date.
    • Then, the final action should be an Update.
1 Like

There an API for that! :wink:

1 Like

Hi, Let me know if I should start a new topic here. I am looking to bulk update a value on all people from say a CSV. How might that be done?

1 Like

Hi Charles, at this time - there is no bulk update functionality within the app from a CSV file. Best bet, if you want to automate, would be to set up some code that hits the NERM API. Outside of code, you could use something like Postman’s Runner to do perform the same actions. Purely inside of NERM, you could set up a Batch workflow, as described above to update profiles.

Here is some example Ruby code ripped out of one of my scripts:

require 'csv'
require 'json'
require 'net/http'

def makeAPIrequest (uriEnd, requesttype, jsonbody = '')
	uri = URI.parse("https://#{@Tenant}#{@url}/api/#{uriEnd}")
  if requesttype== 'get'
    request = Net::HTTP::Get.new(uri)
  elsif requesttype== 'patch'
    request = Net::HTTP::Patch.new(uri)
  end
	request.content_type = "application/json"
    request["Accept"] = "application/json"
	request["Authorization"] = "Token token=#{@API_Token}"
	request.body = jsonbody unless jsonbody == ''

	req_options = {read_timeout: 50,use_ssl: true,verify_mode: OpenSSL::SSL::VERIFY_NONE}
	
	response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
	  http.request(request)
	end
end

CSV.foreach(("test.csv"), headers: true, col_sep: ",") do |row|
  rowData=row.to_hash
  profileName=rowData["name"] # store name then
  rowData.delete("name") # remove name, rest are attributes

  profileID = makeAPIrequest("profiles?name=#{profileName}", "get")
  profilePatchRequest = {"profile": { "attributes": rowData }}.to_json
  makeAPIrequest("profiles/#{profileID}", "patch",profilePatchRequest)
end 

This assumes CSV data like:

name,attribute_value,attribute_value2
Anne,10,11
Bill,20,21

You could of course do this in any number of ways with different methods in code, but the steps would relatively be the same:

  1. Read CSV Data
  2. Form some JSON that meets the requirements for the PATCH Profiles endpoint: patch-profile | SailPoint Developer Community
  3. Send the PATCH request.

Thank you @ZackTarantino-Woolson, that helps a lot!

I see one more. Let’s call this attribute2, If we have the data we want in NERM already in say attribute1 on the profile, would one of the workflows (batch?) be able to grab it and overwrite attribute2? Yes, I know we’d have 2 fields with the same data.

Certainly, You could just use a Set Attribute Values action in a Workflow that uses the “set value” operation with set as set to “another attributes value”. Example:

1 Like

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