<?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: Web AppBuilder Printing with Secured Map Service in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-printing-with-secured-map-service/m-p/558727#M14808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sandeep, which basemap were you using with your custom print service?&amp;nbsp; I created print service with credential embedded for my secured map services.&amp;nbsp; I just recently found out that my print service can't work with some of ESRI default basemap URLs in &lt;SPAN style="font-size: 11pt;"&gt;&lt;A href="http://services.arcgisonline.com/ArcGIS/rest/services"&gt;http://services.arcgisonline.com/ArcGIS/rest/services&lt;/A&gt;, but work for URLs with &lt;A href="https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_GCS_v2/VectorTileServer"&gt;https://basemaps.arcgis.com/arcgis/rest/services&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Sep 2019 19:23:27 GMT</pubDate>
    <dc:creator>Pei-SanTsai</dc:creator>
    <dc:date>2019-09-16T19:23:27Z</dc:date>
    <item>
      <title>Web AppBuilder Printing with Secured Map Service</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-printing-with-secured-map-service/m-p/558725#M14806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to configure the print widget available within the Web AppBuilder (which comes with ArcGIS Portal 10.7.1) and it does not work when there is a secured map service inside the webmap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Background:&lt;/P&gt;&lt;P&gt;1. Have tried to use ArcMap to publish a custom print service with credentials embedded, this seems to work fine for secured service. But, the vector tile from the webmap disappears.&lt;/P&gt;&lt;P&gt;2. Have tried to publish a custom print service from ArcGIS Pro..work fine so long as there is no secured service in the webmap else comes up with an error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2019 13:51:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-printing-with-secured-map-service/m-p/558725#M14806</guid>
      <dc:creator>SandeepKuniel1</dc:creator>
      <dc:date>2019-09-13T13:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder Printing with Secured Map Service</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-printing-with-secured-map-service/m-p/558726#M14807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please check whether the following docs help:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://enterprise.arcgis.com/en/server/latest/create-web-apps/windows/printing-maps-that-contain-secured-services.htm" title="https://enterprise.arcgis.com/en/server/latest/create-web-apps/windows/printing-maps-that-contain-secured-services.htm"&gt;Print maps that contain secured services—Documentation (10.7) | ArcGIS Enterprise&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/web-map-printing-with-arcpy-mp.htm#ESRI_SECTION1_1EB4BCD03C964BF2A9CDC6BC60329F7E" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/web-map-printing-with-arcpy-mp.htm#ESRI_SECTION1_1EB4BCD03C964BF2A9CDC6BC60329F7E"&gt;Web map printing with arcpy.mp—ArcPy | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2019 18:25:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-printing-with-secured-map-service/m-p/558726#M14807</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2019-09-13T18:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder Printing with Secured Map Service</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-printing-with-secured-map-service/m-p/558727#M14808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sandeep, which basemap were you using with your custom print service?&amp;nbsp; I created print service with credential embedded for my secured map services.&amp;nbsp; I just recently found out that my print service can't work with some of ESRI default basemap URLs in &lt;SPAN style="font-size: 11pt;"&gt;&lt;A href="http://services.arcgisonline.com/ArcGIS/rest/services"&gt;http://services.arcgisonline.com/ArcGIS/rest/services&lt;/A&gt;, but work for URLs with &lt;A href="https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_GCS_v2/VectorTileServer"&gt;https://basemaps.arcgis.com/arcgis/rest/services&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2019 19:23:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-printing-with-secured-map-service/m-p/558727#M14808</guid>
      <dc:creator>Pei-SanTsai</dc:creator>
      <dc:date>2019-09-16T19:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder Printing with Secured Map Service</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-printing-with-secured-map-service/m-p/558728#M14809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tanu,&lt;/P&gt;&lt;P&gt;Thank you for writing back to me, i explored few options as suggested in the above links.&lt;/P&gt;&lt;P&gt;These things did not work for me.&lt;/P&gt;&lt;P&gt;1. ImportCredentials into the GP-- even if this would have worked i do not prefer embedding credentials into the GP.&lt;/P&gt;&lt;P&gt;and i had difficulty in creating an .ags file with saved password inside pro. In order to do this, i had to use ArcMap...which again is a workflow i prefer not to use any more.&lt;/P&gt;&lt;P&gt;2. The python code provided in&amp;nbsp;&lt;A href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fpro.arcgis.com%2Fen%2Fpro-app%2Farcpy%2Fmapping%2Fweb-map-printing-with-arcpy-mp.htm%23ESRI_SECTION1_1EB4BCD03C964BF2A9CDC6BC60329F7E" rel="nofollow" style="color: #000000; background-color: #ffffff; border: 0px; text-decoration: underline; font-size: 14px; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;Web map printing with arcpy.mp—ArcPy | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;did not honor dynamic parameters in the layout.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what i ended up doing.&lt;/P&gt;&lt;P&gt;1. Made a copy of the Export Web Map python.&lt;/P&gt;&lt;P&gt;2. Wrote a method to generate token from the portal.&lt;/P&gt;&lt;P&gt;3. Manipulated the webmap json which comes as input.&lt;/P&gt;&lt;P&gt;#######################&lt;/P&gt;&lt;P&gt;token = generateToken(username,password,portalUrl)&lt;BR /&gt;webMapJson = json.loads(WebMap_as_JSON)&lt;BR /&gt;for op in webMapJson["operationalLayers"]:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; op["token"] = token&lt;BR /&gt;result = arcpy.mp.ConvertWebMapToArcGISProject(json.dumps(webMapJson), layoutTemplate)&lt;/P&gt;&lt;P&gt;##################&lt;/P&gt;&lt;P&gt;4. Followed the instructions in &lt;A class="link-titled" href="https://enterprise.arcgis.com/en/server/latest/create-web-apps/windows/tutorial-publish-additional-layouts-for-printing-with-arcgis-pro.htm" title="https://enterprise.arcgis.com/en/server/latest/create-web-apps/windows/tutorial-publish-additional-layouts-for-printing-with-arcgis-pro.htm"&gt;Share a print service web tool with custom layouts from ArcGIS Pro—Documentation (10.7) | ArcGIS Enterprise&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;5. And published the modified Export Web Map python as a geoprocessing tool&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it seemed to work for me....&lt;/P&gt;&lt;P&gt;So, until there is an OOB way to do this within the Web App Builder or changes in the Export Web Map tool supplied with the ArcGIS Pro, i do not see a way to print secured service or you may suggest an alternative&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2019 19:44:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-printing-with-secured-map-service/m-p/558728#M14809</guid>
      <dc:creator>SandeepKuniel1</dc:creator>
      <dc:date>2019-09-16T19:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder Printing with Secured Map Service</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-printing-with-secured-map-service/m-p/558729#M14810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pei,&lt;/P&gt;&lt;P&gt;We have our own&amp;nbsp;vector tile basemap which is shared across the organization.&lt;/P&gt;&lt;P&gt;So, the basemap was never the issue for the print GP, the problems came with the operational layers added to the webmap&lt;/P&gt;&lt;P&gt;-Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2019 19:51:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-printing-with-secured-map-service/m-p/558729#M14810</guid>
      <dc:creator>SandeepKuniel1</dc:creator>
      <dc:date>2019-09-16T19:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder Printing with Secured Map Service</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-printing-with-secured-map-service/m-p/1201749#M22407</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/354380"&gt;@SandeepKuniel1&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking to copy your workaround.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you saying that copied the Export Web Map &amp;amp; Get Layout Templates Info tools into a python script then added this token code to it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
import os
import uuid

token = generateToken(username,password,portalUrl)
webMapJson = json.loads(WebMap_as_JSON)
for op in webMapJson["operationalLayers"]:
    op["token"] = token
result = arcpy.mp.ConvertWebMapToArcGISProject(json.dumps(webMapJson), layoutTemplate)

arcpy.server.ExportWebMap(Web Map as JSON, Output, Format, Layout Templates Folder, Layout Template)

import arcpy
arcpy.server.GetLayoutTemplatesInfo(Layout Templates Folder)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 11 Aug 2022 04:46:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-printing-with-secured-map-service/m-p/1201749#M22407</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-08-11T04:46:39Z</dc:date>
    </item>
  </channel>
</rss>

