<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: arcpy.UploadServiceDefinition_server() and On-Premise Portal in ArcGIS Enterprise Portal Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/arcpy-uploadservicedefinition-server-and-on/m-p/17630#M243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pat,&amp;nbsp;have you fixed that? Is your serve federated? How did you create the .ags connection file in first place?&lt;/P&gt;&lt;P&gt;In 10.6 ArcMap if i create a connection to my federated server using Portal BuildIn account and try to publish using it (from ArcMap 10.6) using the standard UI driven publishing process this can be seen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/406435_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I create an .ags connection just as described here (therefore passing my SSO/SAML):&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/122100"&gt;https://community.esri.com/thread/122100&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the 'Sharing' tab is active. But this only works for publishing from ArcMap. I cannot get an automated publishing workflow being 'signed in' though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2018 13:42:31 GMT</pubDate>
    <dc:creator>SzymonPiskula1</dc:creator>
    <dc:date>2018-05-15T13:42:31Z</dc:date>
    <item>
      <title>arcpy.UploadServiceDefinition_server() and On-Premise Portal</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/arcpy-uploadservicedefinition-server-and-on/m-p/17629#M242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using arcpy.UploadServiceDefinition_server to publish an MXD to an on-premise Portal for ArcGIS 10.4.1 (ArcGIS Server 10.4.1 is installed and federated with the portal).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a script based on &lt;A href="https://blogs.esri.com/esri/arcgis/2013/04/23/updating-arcgis-com-hosted-feature-services-with-python/" rel="nofollow noopener noreferrer" target="_blank"&gt;this example&lt;/A&gt;.&amp;nbsp; I have also been using &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/server-toolbox/upload-service-definition.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;this documentation&lt;/A&gt; (especially example 3) to guide me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My goal is to share the published services with a group defined on the Portal server, but so far every time I publish, the feature layer is "Not Shared".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of my UploadServiceDefinition call:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.UploadServiceDefinition_server(
&amp;nbsp; "myMapService.sd",&amp;nbsp; # in_sd_file
&amp;nbsp; "myServerConnection.ags",&amp;nbsp; # in_server
&amp;nbsp; "newServiceName",&amp;nbsp; # in_service_name
&amp;nbsp; "",&amp;nbsp; # in_cluster
&amp;nbsp; "",&amp;nbsp; # in_folder_type
&amp;nbsp; "",&amp;nbsp; # in_folder
&amp;nbsp; "STARTED",&amp;nbsp; # in_startupType
&amp;nbsp; "OVERRIDE_DEFINITION", # in_override
&amp;nbsp; "SHARE_ONLINE", # in_my_contents
&amp;nbsp; "PRIVATE", # in_public
&amp;nbsp; "NO_SHARE_ORGANIZATION", # in_organization
&amp;nbsp; "My Group" # in_groups
)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried changing the in_groups parameters to a list, like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.UploadServiceDefinition_server(
&amp;nbsp; "myMapService.sd",&amp;nbsp; # in_sd_file
&amp;nbsp; "myServerConnection.ags",&amp;nbsp; # in_server
&amp;nbsp; "newServiceName",&amp;nbsp; # in_service_name
&amp;nbsp; "",&amp;nbsp; # in_cluster
&amp;nbsp; "",&amp;nbsp; # in_folder_type
&amp;nbsp; "",&amp;nbsp; # in_folder
&amp;nbsp; "STARTED",&amp;nbsp; # in_startupType
&amp;nbsp; "OVERRIDE_DEFINITION", # in_override
&amp;nbsp; "SHARE_ONLINE", # in_my_contents
&amp;nbsp; "PRIVATE", # in_public
&amp;nbsp; "NO_SHARE_ORGANIZATION", # in_organization
&amp;nbsp; ["My Group"] # in_groups
)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, so far, no matter what parameters I supply that seem to apply to sharing, the feature layer is always "Not Shared" after publishing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing something fundamental?&amp;nbsp; If anyone can point me toward the light I would be most appreciative.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:42:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/arcpy-uploadservicedefinition-server-and-on/m-p/17629#M242</guid>
      <dc:creator>PatBlair2</dc:creator>
      <dc:date>2021-12-10T20:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.UploadServiceDefinition_server() and On-Premise Portal</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/arcpy-uploadservicedefinition-server-and-on/m-p/17630#M243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pat,&amp;nbsp;have you fixed that? Is your serve federated? How did you create the .ags connection file in first place?&lt;/P&gt;&lt;P&gt;In 10.6 ArcMap if i create a connection to my federated server using Portal BuildIn account and try to publish using it (from ArcMap 10.6) using the standard UI driven publishing process this can be seen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/406435_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I create an .ags connection just as described here (therefore passing my SSO/SAML):&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/122100"&gt;https://community.esri.com/thread/122100&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the 'Sharing' tab is active. But this only works for publishing from ArcMap. I cannot get an automated publishing workflow being 'signed in' though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2018 13:42:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/arcpy-uploadservicedefinition-server-and-on/m-p/17630#M243</guid>
      <dc:creator>SzymonPiskula1</dc:creator>
      <dc:date>2018-05-15T13:42:31Z</dc:date>
    </item>
  </channel>
</rss>

