Adding GIS Server Connection with Enterprise login

11-15-2017 06:51 PM
New Contributor III

Hello all,

I'm trying to utilize the code in the link below to do batch geocoding.

batch-geocoding-python/ at master · deelesh/batch-geocoding-python · GitHub 

I cant get it to work as it says it cannot find the World.GeocodeServer.  Looking in ArcCatalog I can see the ags file, however it will not connect using my Enterprise login.  It does connect if I input my public login, however if what I see in ArcMap is correct, I cannot access the Geocode Service without and Enterprise login.  When I use my public login the ags file gets created, connects, and then the arcpy.geocoding.GeocodeAddresses function fails.  I know I have all the fields correct.  I think it's something to do with the fact that I need to login using my Enterprise credentials, however it won't accept them.  This could be because I need to provide a different url for the login, but I'm not sure where to do that either.  Anyone done this before?



0 Kudos
3 Replies
Esri Esteemed Contributor

Hi Charles,

Currently, I don't think it's possible to authenticate using an ArcGIS Online Enterprise Login.  If you're an Administrator in your ArcGIS Online organization you can create a built-in user account by going to My Organization > Invite Members.  You will be able to use this account to connect to the World Geocoding service.

0 Kudos
Esri Regular Contributor


If you were going to sign into your Enterprise organization's portal in ArcMap you would use the following URL, More info about portal connections in ArcMap can be found at Manage ArcMap portal connections—Help | ArcGIS Desktop .Then in ArcMap you would be able to sign in with the Enterprise credentials and the World Geocoding Service will be available in the Geocoding toolbar. If you were going to make an ArcGIS Server connection (.ags file) you would use the following URL and include the Enterprise credentials, .

Esri Regular Contributor

To add on to my previous response and relating it to the Python code and your Enterprise portal you would make the following changes using your federated server for server_url.

#Create the ArcGIS Server connection file
server_url = ""
conn_file_name = "arcgis_online_batch_geocoding.ags"
conn_file = os.path.join(cwd, conn_file_name)
username = "<your username>"
password = "<your password>"
arcpy.mapping.CreateGISServerConnectionFile("USE_GIS_SERVICES", cwd, conn_file_name, server_url,
"ARCGIS_SERVER", username=username, password=password)

0 Kudos