AnsweredAssumed Answered

Data source not referenced when Publishing to Federated ArcGIS Server using arcpy

Question asked by agelfert on Aug 26, 2019
Latest reply on Sep 5, 2019 by JSnyder-esristaff

This post is related to an earlier question. I'm spawning a new thread since this is a more specific question.


When you're publishing a map service to ArcGIS Enterprise from ArcGIS Pro, you get to choose what server to publish to, e.g. your federated ArcGIS Server or a Hosting Server. You also get to select whether to "Reference Registered Data" or "Copy all data".


There are no similar preferences or parameters when using (documentation):

arcpy.UploadServiceDefinition_server(inSdFile, inServer, 
inServiceName,inCluster, inFolderType, inFolder, inStartup,
inOverride, inMyContents, inPublic, inOrganization, inGroups)

You just provide a server URL via inServer.


There is also the attribute

sharing_draft = m.getWebLayerSharingDraft( ... )
sharing_draft.federatedServerUrl =

when creating your sddraft file.


I've run into a conundrum where the published service shows up in my federated server REST endpoint but the underlying SDE data that the map in PRO was referencing is not referenced by the map service, instead a GDB shows up at:



To confirm, if I wipe out the GDB (have to stop Server), sure enough, the associated Portal item comes up blank. I haven't run into this before. All my other scripted publishing has worked like a charm.


Since there is no "Reference Registered Data" option in arcpy, is this possibly default behavior when a specific datastore is not registered in ArcGIS Server Manager?