Choose ‘Folder’ location when publishing to AGOL from Desktop

03-27-2014 04:58 AM
Status: Implemented
Labels (1)
Occasional Contributor

When publishing a map from my desktop to my ArcGIS Online for Organizations account, I would like to be able to choose which folder the hosted service is published to.  Publishing to ArcGIS for Server allows this.  AGOL, currently, does not.

The information contained in the link that bruce_harold included won't allow you to publish to a folder in AGOL, only to your ArcGIS Server folders.  I have a scenario where I'm trying to publish  layers to an Open Data folder in our AGOL organization account to allow for the discovery of this information using the new Open Data tools.  I want to use arcpy, but the current arcpy tools don't work since OAuth is now used to sign into AGOL, therefore, the arcpy.SignInToPortal_server command doesn't work unless you have an open ArcGIS Desktop application that's signed into AGOL when you run the script.

In any case, this link ( shows you how to use the ArcGIS REST API and python to automatically publish a feature service to AGOL.  And working with ESRI staff, i was able to create a script that also will allow you to publish to a particular folder.  It basically boils down to needing to use the moveItems REST command.

But if there were just some more straightforward tools in arcpy, things would be much simpler for the end user when it comes time to script things.
It is possible to publish to a folder through ArcMap by following the steps below:
1. Ensure that the folder that you want to publish in ArcGIS Online exists
2. Manually enter the foldername/Servicename when publihsing.
      Example of service name published to the default directory: Servicename = Servicename
      Example of ServiceName in specific folder: servicename = Myfolder/servicename

Status changed to: Implemented

This has since been made available in ArcGIS Pro.