SGC-JAMF: 401 Error During Computer Data Source Pagination Due to Incorrect Auth API EndpointDescriptionWhen running the SGC-JAMF computer data source, if pagination continues for more than 30 minutes, the system attempts to refresh the auth token using a deprecated endpoint (/uapi/auth/tokens).This results in a 401 Unauthorized error, preventing the data source from completing and potentially impacting performance.Steps to Reproduce Enable JAMF Pro API in setup.Run the SGC-JAMF computers data source. Observe: Initial call is made to /uapi/auth/tokens (deprecated).After 30 minutes, pagination triggers and causes 401 Unauthorized error.Workaround1. This issue is fixed in 2.12.2 version of SG-Jamf, customer can upgrade. (Recommended Solution) 2. If customer wants to remain in 2.12.2. Customer can follow below steps. Open computersinventory flow action 1. Update the code in script step from '/uapi/auth/token' to '/api/v1/auth/token' as below. (function execute(inputs, outputs) { var input = {}; input['connection_alias'] = inputs.connection_alias_in; input['resource_path_prefix'] = '/api/v1/auth/token'; var output = sn_fd.FlowAPI.executeAction('sn_jamf_integrate.authtoken', input); outputs.token = output.token; outputs.expires = output.expires; })(inputs, outputs); 2. Update the code in the Pagination Setup step as per below and then save, publish the flow action. Please find the updated code. (function paginate(variables, pageResponse) { var tokenRefreshTimeThresholdInSec = parseInt(gs.getProperty('sn_jamf_integrate.token_refresh_time_threshold_in_sec', 300)); var page = parseInt(variables.page); variables.getNextPage = true; variables.page = (page + 1) + ""; var currentTime = new GlideDateTime(); var expireGlideTime = new GlideDateTime(variables.tokenExpiryTime.split('.')[0]); var timeDiffInSec = (expireGlideTime.getNumericValue() - currentTime.getNumericValue()) / 1000; if (timeDiffInSec < tokenRefreshTimeThresholdInSec) { var connectionAlias = new GlideRecord("sys_alias"); connectionAlias.get(variables.connection_alias_sys_id); var input = {}; input['connection_alias'] = connectionAlias; input['resource_path_prefix'] = '/api/v1/auth/token'; var output = sn_fd.FlowAPI.executeAction('sn_jamf_integrate.authtoken', input); variables.token = output.token; variables.tokenExpiryTime = output.expires; //format : yyyy-MM-dd'T'HH:mm:ss.SSSZ } })(variables, pageResponse); You can refer the below screenshot as well with updated code. Related Problem: PRB1754132