Is it possible to Create, Update and Deactivate users using the API

Hi Everyone,
We've been looking at the Advanced Employee Updater API mentioned below.
We are planning to use Okta for SSO, but the OOTB integration with Expensify (from what my research and chats with support tell me) that the Provisioning feature only support Deactivating users.
Which led us to this API. We would look to use Okta's Workflows engine to see if its possible.
My question is... Is it possible to manager the user's lifecycle using this API?
Does the API use Basic Auth? Just a UN & PW: partnerUserID
and partnerUserSecret
Can we create new users against a specific policy?
Are we able to update users if their email, name or policy changes (based on our rule set in Okta Workflows)?
I assume we can deactivate users by setting the isTerminated attribute to True?
Thanks, and I hope someone can clarify the above.
Steve
Answers
-
Hi !
I have found this post since I am looking to do exactly the same: Manage Expensify user lifecycle using Okta Workflows.
It appears that creating, updating and deleting users is possible through the Advanced Employee Updater.
Let me know if you made any progress on that or if you'd like to work together in order to get this done.
-
@sslavierogocardless @humusuzi
Were you able to create a new user through the API?
I have been trying to do it , buy have only been able to update existing users, is it possible to create new users?
Any help is welcome!
-
Please refer to our API documentation here for a full run down of the integrations you can make with Expensify. https://integrations.expensify.com/Integration-Server/doc/
-
@Zanellantonio Thank you for the link.
Documentation is indeed confusing for the Advanced Employee Updater. Creation, Update and Termination, all appears to rely on the "type": "update" parameter.
The way I understood it so far is:
Creation: Simply put in data of a user which is not on Expensify yet
Update: Use existing employee the details w/ the details you want to change
Update: Use existing employee the details w/ the parameter isTerminated (If set to true, the employee will be removed from the
policyID
)Referencing another thread in which we discussed the conflict with the Employee ID attribute: https://community.expensify.com/discussion/comment/21350#Comment_21350
Let me know if there's anything else I can help with
-
I am trying to get the list employee using "Advanced employee updater" Api i always get the following error in postman.
"securityGroupEmployeesMap": {},
"policyIDToEmailsToRemoveMap": {},
"message": "Employee data not found",
"updatedEmployeesCount": 0,
"responseCode": 410
Can you try to help me sort this issue.
Do you have any predefined postman script to create, view, update employee.
-
@pon we can definitely give it a go at helping with this error! To try to help with the error we'd need to see your code, could you share it here?
For info on creating, viewing, updating employees please take a look at the employee updater section of the API: https://integrations.expensify.com/Integration-Server/doc/employeeUpdater/
-
I have also been looking at how to do this through Okta Workflows, and am quite stuck.
This is very simple through Postman, but, once you implement Okta's limited Auth Types: Basic, OAuth, Custom, or None we get more complicated. When using "None" and trying to form it yourself you begin to run into many issues.
-
@Sonia Liapounova I was tried using postman script and i got the below error.
"securityGroupEmployeesMap": {},
"policyIDToEmailsToRemoveMap": {},
"message": "Employee data not found",
"updatedEmployeesCount": 0,
"responseCode": 410
Please help me to have the postman script to create employee
-
@iOINADOINwoinadf Can you share the postman script to me. i am not able get on postman script too.
-
@pon I think this might be easier to address in Concierge. You can open a chat with us via the website, or you can message [email protected]. We're going to want screenshots of what you're doing in Postman. It looks like you aren't correctly attaching the employee data to the request.
-
@JeremyAmos , I have responded by Concierge with employee sync in detail.
unfortunately I have received no response from Concierge
The issues i am facing is
Employee Creation in Expensify using JSON
- My Postman Curl script is below
curl -X POST 'https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations' \
-d 'requestJobDescription={
"type": "update",
"dry-run" : true,
"credentials": {
"partnerUserID": "aa_pon_konnectify_co",
"partnerUserSecret": "xxxx",
},
"dataSource" : "download",
"inputSettings": {
"type": "employees",
"entity": "generic"
},
"onFinish":[
{"actionName": "email", "recipients":"[email protected]"}
]
}'
Given Employee JSON in below format.
{
"Employees": [
{
"employeeEmail": "[email protected]",
"managerEmail": "[email protected]",
"policyID": "0123456789ABCDEF"
},
{
"employeeEmail": "[email protected]",
"managerEmail": "[email protected]",
"policyID": "0123456789ABCDEF"
}
]
}
I got below error.
{"responseMessage":"'requestJobDescription' is missing","responseCode":500}
Some time I got below error too
"securityGroupEmployeesMap": {},
"policyIDToEmailsToRemoveMap": {},
"message": "Employee data not found",
"updatedEmployeesCount": 0,
"responseCode": 410