<?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 Cannot sign into portal via ArcPy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/cannot-sign-into-portal-via-arcpy/m-p/1040577#M60549</link>
    <description>&lt;P&gt;I am trying to export my utility network package via arcpy.pt.UtilityNetworkToAssetPackage(), however my initial error was:&lt;/P&gt;&lt;P&gt;arcgisscripting.ExecuteError: ERROR 002119: Must be connected and signed into the portal.&lt;BR /&gt;Failed to execute (UtilityNetworkToAssetPackage).&lt;/P&gt;&lt;P&gt;So I added a line before the utility network call to sign into my portal, and this error is now thrown:&lt;/P&gt;&lt;P&gt;ValueError: Error signing on to &amp;lt;myportal&amp;gt;.&lt;BR /&gt;&lt;BR /&gt;Message : s&lt;BR /&gt;Details : Unable to generate token.&lt;/P&gt;&lt;P&gt;Anyone have any potential solutions for this kind of error?&lt;/P&gt;&lt;P&gt;Sample code is below:&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;arcpy.SignInToPortal(&amp;lt;portalurl&amp;gt;, &amp;lt;username&amp;gt;, &amp;lt;password&amp;gt;)&lt;/P&gt;&lt;P&gt;arcpy.pt.UtilityNetworkToAssetPackage(un, '*', dest_path, file_name, 'INCLUDE_DATA')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Mar 2021 13:25:42 GMT</pubDate>
    <dc:creator>ColtonLuttrell</dc:creator>
    <dc:date>2021-03-25T13:25:42Z</dc:date>
    <item>
      <title>Cannot sign into portal via ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/cannot-sign-into-portal-via-arcpy/m-p/1040577#M60549</link>
      <description>&lt;P&gt;I am trying to export my utility network package via arcpy.pt.UtilityNetworkToAssetPackage(), however my initial error was:&lt;/P&gt;&lt;P&gt;arcgisscripting.ExecuteError: ERROR 002119: Must be connected and signed into the portal.&lt;BR /&gt;Failed to execute (UtilityNetworkToAssetPackage).&lt;/P&gt;&lt;P&gt;So I added a line before the utility network call to sign into my portal, and this error is now thrown:&lt;/P&gt;&lt;P&gt;ValueError: Error signing on to &amp;lt;myportal&amp;gt;.&lt;BR /&gt;&lt;BR /&gt;Message : s&lt;BR /&gt;Details : Unable to generate token.&lt;/P&gt;&lt;P&gt;Anyone have any potential solutions for this kind of error?&lt;/P&gt;&lt;P&gt;Sample code is below:&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;arcpy.SignInToPortal(&amp;lt;portalurl&amp;gt;, &amp;lt;username&amp;gt;, &amp;lt;password&amp;gt;)&lt;/P&gt;&lt;P&gt;arcpy.pt.UtilityNetworkToAssetPackage(un, '*', dest_path, file_name, 'INCLUDE_DATA')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 13:25:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cannot-sign-into-portal-via-arcpy/m-p/1040577#M60549</guid>
      <dc:creator>ColtonLuttrell</dc:creator>
      <dc:date>2021-03-25T13:25:42Z</dc:date>
    </item>
  </channel>
</rss>

