I am trying to use the 'create assignment from csv' python script for assignment creation in the new Workforce in ArcGIS for Enterprise Portal. In the past I had been successful using this script for assignment created in Workforce in AGOL. When I insert a headless Enterprise user account with administrative privileges, it appears the authentication fails. When I insert my credentials, authentication appears to succeed, but then an error occurs stating my username is not a dispatcher. The Workforce project (new not classic) has me as a dispatcher. Any help would be appreciated. Thank you.
Hi for the authentication issue with the admin user, can you check the case of the username? It's case-sensitive when you authenticate this way with the Python API. Either way, if that user is not a dispatcher, then they won't be permitted to make modifications using the Workforce module of the Python API.
When you load a project, all of the dispatchers are fetched and then the current users username is compared to the user_id each dispatcher - if there is no match, then you will get the exception that the current user is not a dispatcher. How are you authenticating with the script? By providing username and password or did you modify it to use an OAuth flow.
Which version of Enterprise are you using?
Which version of the Python API are you using?
Hi Aaron, Where can I find the -custom geocoder-id values for various custom geocoders? We have gotten past the credential issue (I think), the CSV file is read, but we now seem to be tripping over the geocoder. If I don't include the custom geocoder parameter in the command line, I get an invalid token error. If I include the parameter using an ID (from past work, and I have no recollection of where I found this value), the message is suggesting something to do with the geocoder.
The customer-geocoder id is an item id to a Locator in your organization.
What is happening is that since no locator is provided, it is using the default geocoder which is the World Geocoding Service. This service requires authentication for batch geocoding because it costs credits and is hosted in ArcGIS Online. Because you are not signed into AGOL it is sending your Enterprise token which is returned as invalid. If you use your own locator in the script or change the default geocoder for your org to something that supports batch geocoding, it should work.
I want to tell you that I am making assignments from the ArcGIS ENTERPRISE account, but I have not had any error to which you mention, the only big error that I have when adding assignments with the batch_add method this throws me an error that I still cannot sort out.
I wanted to know if you have any similar error?