<?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.SignInToPortal &amp;quot;Failed to sign out&amp;quot; error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-signintoportal-quot-failed-to-sign-out-quot/m-p/1109702#M62727</link>
    <description>&lt;P&gt;Did you ever get this resolved? I'm running into a similar issue.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Oct 2021 14:00:50 GMT</pubDate>
    <dc:creator>tigerwoulds</dc:creator>
    <dc:date>2021-10-21T14:00:50Z</dc:date>
    <item>
      <title>arcpy.SignInToPortal "Failed to sign out" error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-signintoportal-quot-failed-to-sign-out-quot/m-p/1023642#M59802</link>
      <description>&lt;P&gt;I am trying to create a map service definition file in Python (see a snippet below). The code fails on the line&amp;nbsp;&lt;SPAN&gt;arcpy.SignInToPortal:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;arcpy.SignInToPortal("****", "****", "****")&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;File "D:\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 2468, in SignInToPortal&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;return _SignInToPortal(*args, **kwargs)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ValueError: Failed to sign out.&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I confirmed that I am not logged in to the portal on the machine which the script is executed. The portal URL and the user credentials are correct as well. Why am I getting the error and how to get around it? Thanks!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;----------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;arcpy.SignInToPortal(portalURL,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"MyUserName"&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"MyPassword"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sharingDraft&amp;nbsp;=&amp;nbsp;mp.getWebLayerSharingDraft(&lt;/SPAN&gt;&lt;SPAN&gt;"HOSTING_SERVER"&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"FEATURE"&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;serviceName)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sharingDraft.portalURL&amp;nbsp;=&amp;nbsp;portalURL&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sharingDraft.portalFolder&amp;nbsp;=&amp;nbsp;serviceFolderName&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sharingDraft.description&amp;nbsp;=&amp;nbsp;newDescription&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sharingDraft.summary&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"[Summary]"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sharingDraft.tags&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"[Tags]"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sharingDraft.credits&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"[Credits]"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sharingDraft.useLimitations&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"[Limitations]"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sharingDraft.copyDataToServer&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;False&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sharingDraft.exportToSDDraft(sdDraftFilePath)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arcpy.StageService_server(sdDraftFilePath,&amp;nbsp;sdOutputFilePath)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 20:52:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-signintoportal-quot-failed-to-sign-out-quot/m-p/1023642#M59802</guid>
      <dc:creator>azlotin</dc:creator>
      <dc:date>2021-02-04T20:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SignInToPortal "Failed to sign out" error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-signintoportal-quot-failed-to-sign-out-quot/m-p/1023772#M59808</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/429278"&gt;@azlotin&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;My first guess would be the Portal URL.&lt;BR /&gt;I know that you have checked that it is correct, but do you have the real string identifier in front of the string?&lt;BR /&gt;e.g:&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt; r&lt;/FONT&gt;&lt;/STRONG&gt;"https://&amp;lt;portal webadaptor url&amp;gt;/&amp;lt;webadaptor name&amp;gt;/"&lt;/P&gt;&lt;P&gt;If you have, then I would be looking to see if the script can ping the server first as t may be a network issue as well.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 03:17:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-signintoportal-quot-failed-to-sign-out-quot/m-p/1023772#M59808</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-02-05T03:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SignInToPortal "Failed to sign out" error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-signintoportal-quot-failed-to-sign-out-quot/m-p/1109702#M62727</link>
      <description>&lt;P&gt;Did you ever get this resolved? I'm running into a similar issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 14:00:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-signintoportal-quot-failed-to-sign-out-quot/m-p/1109702#M62727</guid>
      <dc:creator>tigerwoulds</dc:creator>
      <dc:date>2021-10-21T14:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SignInToPortal "Failed to sign out" error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-signintoportal-quot-failed-to-sign-out-quot/m-p/1111655#M62818</link>
      <description>&lt;P&gt;I think Michael is spot on with the portal URL.&lt;/P&gt;&lt;P&gt;I ran into the same problem today, and found out that the portal URL read from a configuration file was something like this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://myserver/portal/home" target="_blank"&gt;https://myserver/portal/home&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When I changed to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://myserver/portal/home" target="_blank"&gt;https://myserver/portal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;everything worked!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 15:02:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-signintoportal-quot-failed-to-sign-out-quot/m-p/1111655#M62818</guid>
      <dc:creator>CarstenB_orsted</dc:creator>
      <dc:date>2021-10-27T15:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SignInToPortal "Failed to sign out" error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-signintoportal-quot-failed-to-sign-out-quot/m-p/1118344#M63006</link>
      <description>&lt;P&gt;I second &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/475927"&gt;@CarstenB_orsted&lt;/a&gt; .&lt;BR /&gt;&lt;BR /&gt;This worked for signing in to AGOL:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Sign in to AGOL
arcpy.SignInToPortal("https://wcountygis.maps.arcgis.com/", "user", "pass")

arcpy.SignInToPortal(r"https://wcountygis.maps.arcgis.com/", "user", "pass")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This didn't work:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.SignInToPortal("https://wcountygis.maps.arcgis.com/home", "user", "pass")

arcpy.SignInToPortal(r"https://wcountygis.maps.arcgis.com/home", "user", "pass")&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 18 Nov 2021 19:43:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-signintoportal-quot-failed-to-sign-out-quot/m-p/1118344#M63006</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2021-11-18T19:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SignInToPortal "Failed to sign out" error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-signintoportal-quot-failed-to-sign-out-quot/m-p/1320068#M68449</link>
      <description>&lt;P&gt;For us - this seems to be related to a self signed cert error.&amp;nbsp; If using the Python API, GIS('myportalurl', username, password) fails with ssl validation error unless I add verify_cert=False as a parameter.&amp;nbsp; The problem is, there is no way to do this using Arcpy.SignInToPortal, which is required for programmatically publishing services.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 13:33:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-signintoportal-quot-failed-to-sign-out-quot/m-p/1320068#M68449</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2023-08-18T13:33:39Z</dc:date>
    </item>
  </channel>
</rss>

