laptop and a wrench

Bug

When using an unsecured geocode service, the following error is returned after adding a workflow, “Your Workflow failed: Invalid Token.”

Last Published: September 26, 2017 ArcGIS for SharePoint
Bug ID Number BUG-000093113
SubmittedDecember 21, 2015
Last ModifiedJune 5, 2024
Applies toArcGIS for SharePoint
Version found4.1
StatusKnown Limit

Additional Information

This is a known limitation. The geocoder must be shared with everyone for the workflow to succeed. Sharing the geocoder with everyone should correct the issue.

Workaround

Option 1: Manual Workaround Required People: Esri Maps for SharePoint User, ArcGIS Online Administrator, ArcGIS Server Administrator. Steps: 1. Confirm if a working geocode service is published to ArcGIS Server. a. The following service are used successfully (http://geodata.md.gov/imap/rest/services/GeocodeServices/MD_CompositeLocator/GeocodeServer). 2. Log in to ArcGIS Server Manager and make sure the service using built-in authentication is secured. a. Create a new user and role if necessary. b. Add the user to the new role. c. Find the Service listed in ArcGIS Server Manager and make sure the members of the new role have access to the service. 3. Log in to ArcGIS Online and add the geocode service using the Add Item > From Web workflow. a. Ensure to choose to embed credentials with the service. b. When the item is created, the new item page will be displayed. Under the ArcGIS Web API REST Connection heading the following URL is displayed, (http://utility.arcgis.com/usrsvcs/servers/<string of numbers and letters>/rest/services/<Name Of Item>/GeocodeServer). c. Copy the URL. 4. Go to the My Organization window > Click Edit Settings > Go to the Utility Services Tab. 5. Click Add Geocoder. a. Paste the URL from the ArcGIS Online Item into the Geocoder URL. b. Add a Geocoder Name. c. Check the boxes for Allow place finding and Allow batch geocoding. d. Click OK and click the Save button. 6. Go back to ArcGIS Server Manager and unsecure the service. 7. Now test the Esri Maps Locate workflow with the geocode service. Option 2: Scripted Workaround Very Important: The second option is a script that is created to add an unsecured geocode service with embedded ArcGIS for Server credentials. This is not a supported workflow. However, this is tested and works. Required People: Esri Maps for SharePoint User, ArcGIS Online Administrator, ArcGIS Server Administrator. Steps: 1. Save the Zip file attached to this email and extract the contents. 2. In the extracted folder, also extract the contents of the requests.zip file. 3. Open the addSecureGeocode.py in a text editor like NotePad++ or PyScripter. 4. Make the following changes in the script. a. Line 31: replace the text inside the quotes ‘What is the ArcGIS Online Username?’ with the ArcGIS Online username. b. Line 32: replace the text inside the quotes ‘What is the ArcGIS Online Password?’ with the ArcGIS Online password. c. Line 53: replace the sampleserver6 geocode service URL inside the quotes with your geocode service URL. d. Line 54: replace the text inside the quotes ‘user1’ with a username from ArcGIS for Server. i. For this step, have the ArcGIS Server administrator create a username and password that can access ArcGIS for Server. Since the service is not secured any user that is added to ArcGIS for Server can access the service the same as a non-authenticated user. The ArcGIS for Server administrator does not need to grant the user any explicit access to the non-secured service. e. Line 55: replace the text inside the quotes ‘user1’ with a the password for the user account. i. See the disclaimer from above step. An ArcGIS for Server administrator must setup the username and password in ArcGIS Server Manager and provide this information to the person preparing this script (probably the ArcGIS Online Administrator). f. Line 56: replace the spatial reference ID with the geocode service spatial reference ID. 5. Save the script. 6. Run the script in the command prompt or in any other environment capable of running a python script (PyScripter is a popular and easy environment to use). 7. If the message ‘Service Successfully Added’ is seen then the script was successful. 8. Have the ArcGIS Online Administrator log in to ArcGIS Online and find the item created for the geocode service. 9. Go to that items details page. 10. Under the ArcGIS Web API REST Connection heading, a URL like the following can be seen, http://utility.arcgis.com/usrsvcs/servers/<string of numbers and letters>/rest/services/<Name Of Item>/GeocodeServer. a. Copy that URL 11. Go to the My Organization Window > Click Edit Settings > Go to the Utility Services Tab. 12. Press Add Geocoder. a. Paste the URL from the ArcGIS Online Item into the Geocoder URL. b. Add a Geocoder Name such as ‘Esri Maps for SharePoint Geocoder’. c. Check the boxes for Allow place finding and Allow batch geocoding. d. Press OK and Press the Save button. 13. Now test the Esri Maps Locate workflow with your geocode service.

Steps to Reproduce

Bug ID: BUG-000093113

Software:

  • ArcGIS for SharePoint

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options