RestAPI error

So we are in the process of upgrading to Kinetic and I’ve Tested this in both our current production version and the upgrade version.

I’m trying to use the Rest API to hook up to our user Provisioning service so User account will get created and disabled however I’m running into an issue.

I can make get requests just fine if i call https:////api/v1/Erp.BO.UserFileSvc/UserFiles(dcduserid)

I can retrieve user details however if I do a Patch Request and change anything or even just the userdisabled flag which is all I want to do on e10 I get a “Sorry! Something went wrong. Please contact your system administrator.” with no further info after looking at the windows error logs it states “You are not allowed to modify payroll manager privileges.”

on kinetic however I will get “You are not allowed to modify payroll manager privileges.”

I have attempt both systems using the System Manager account and it does have security user roles. no users are setup as payroll manager as we do not even have that module has anyone ever seen this before and how to fix it?

the payroll manager error appears on any user I attempt to modify and by looking directly at the database no user has this set and checking every user by API shows “IsCurCompPayrollMgr”: false

What does your json payload look like? The user you are using to connect via API does it have proper permissions?

There is a conversion program meant to fix payroll manager related fields, can you run that and retest? I don’t remember the number but the name is very descriptive.

1 Like

yes the User account has permission I’ve even tried with the system manager account and get the same error.

Ill take a look and see if that fixes it

looks like I found the Issue you have to use the ice.BO.UserFileSvc/UserFiles API to edit User Accounts and you have to use the Erp.BO.EmpBasicSvc/EmpBasics to edit the Employee Records

We create both a User and Employee Record and link them together as all Our Computer Access even for MES requires every User to have their own Computer account for access no Generic Accounts allowed at all in our environment. I was trying to figure this out for a few days and was just looking at the wrong API

If you use an Epicor function, you can encapsulate both in a single REST call.

1 Like

For future ref, Instead of using Erp.BO.UserFile, use Ice.BO.UserFile.
In the case of using UpdateExt, you cannot pass the UserComp info (lest you want GetNewUserComp is deprecated message - you have call AddCompany to finish it up)