<?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 arcpy licensing with ArcGIS Pro/Portal when using service account in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-licensing-with-arcgis-pro-portal-when-using/m-p/695476#M53902</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying to move off Python 2.7 and rewrite my scripts in Python 3.6 that shipped with ArcGIS Pro. So far no real upsets as long as I'm the one running the script. (I'm licensed for Pro.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I try&amp;nbsp;scheduling&amp;nbsp;a script with Task Scheduler via batch file using a service account on a server, the script dies.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run python cmd as service account and then try "import arcpy", I get:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/475892_arcpyimport.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interesting ... but makes sense that arcpy requires licensing. So since I have Pro on the same box, I tried that and also get a licensing&amp;nbsp;message&amp;nbsp; - "A core license could not be found...".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see there is a &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/functions/signintoportal.htm"&gt;way to log in to Portal&lt;/A&gt;&amp;nbsp;in Python...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SignInToPortal&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetActivePortalURL&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'username'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'password'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I guess my service account first needs a Portal account.&amp;nbsp;When I try&amp;nbsp;to grant that as Portal Admin, I get :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff; font-size: 12px;"&gt;One or more members are missing an email address and will not be added.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh c'mon!!!&amp;nbsp;So do I now have&amp;nbsp;to request an email address for my&amp;nbsp;service account? Or is there another way to make this work?&amp;nbsp;Help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Dec 2019 22:49:17 GMT</pubDate>
    <dc:creator>Arne_Gelfert</dc:creator>
    <dc:date>2019-12-10T22:49:17Z</dc:date>
    <item>
      <title>arcpy licensing with ArcGIS Pro/Portal when using service account</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-licensing-with-arcgis-pro-portal-when-using/m-p/695476#M53902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying to move off Python 2.7 and rewrite my scripts in Python 3.6 that shipped with ArcGIS Pro. So far no real upsets as long as I'm the one running the script. (I'm licensed for Pro.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I try&amp;nbsp;scheduling&amp;nbsp;a script with Task Scheduler via batch file using a service account on a server, the script dies.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run python cmd as service account and then try "import arcpy", I get:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/475892_arcpyimport.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interesting ... but makes sense that arcpy requires licensing. So since I have Pro on the same box, I tried that and also get a licensing&amp;nbsp;message&amp;nbsp; - "A core license could not be found...".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see there is a &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/functions/signintoportal.htm"&gt;way to log in to Portal&lt;/A&gt;&amp;nbsp;in Python...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SignInToPortal&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetActivePortalURL&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'username'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'password'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I guess my service account first needs a Portal account.&amp;nbsp;When I try&amp;nbsp;to grant that as Portal Admin, I get :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff; font-size: 12px;"&gt;One or more members are missing an email address and will not be added.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh c'mon!!!&amp;nbsp;So do I now have&amp;nbsp;to request an email address for my&amp;nbsp;service account? Or is there another way to make this work?&amp;nbsp;Help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2019 22:49:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-licensing-with-arcgis-pro-portal-when-using/m-p/695476#M53902</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2019-12-10T22:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy licensing with ArcGIS Pro/Portal when using service account</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-licensing-with-arcgis-pro-portal-when-using/m-p/695477#M53903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, so you hate to&amp;nbsp;answer your own question because it just proves you either didn't think through the question carefully before posing it or you were just too lazy to try and answer it yourself instead of wasting everyone else's time by asking them. In my defense I can only say that sometimes&amp;nbsp;spelling out the question&amp;nbsp;helps me phrase it properly in my mind and gets the investigative, inquisitory juices flowing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So while I wasn't able to create a user for my service account in&amp;nbsp;Portal ('Add Members' isn't really intended for that), I was able to so in the Portal admin interface. All I did was create an admin user here, then I could grant that user 'Admin' status in Portal under Organization, plus Level 2 status, and a Pro license. Could be that was overkill. But at least it now&amp;nbsp;allows the account to import arcpy in Python 3.6 and execute my script.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2019 22:38:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-licensing-with-arcgis-pro-portal-when-using/m-p/695477#M53903</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2019-12-11T22:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy licensing with ArcGIS Pro/Portal when using service account</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-licensing-with-arcgis-pro-portal-when-using/m-p/1131604#M63434</link>
      <description>&lt;P&gt;I'm in the throes of exactly the same problem, and I had considered doing what you said, except that our Pro licensing comes via AGOL not Portal.&amp;nbsp; But this burns a named user just to automate some basic data maintenance tasks. Is there really no better way?&lt;BR /&gt;&lt;BR /&gt;I also considered logging in as the service account on the machine where the task is run and opening Pro using *my* credentials. That seems like it may violate some terms of use, but my main concern here is that I'd like my stuff to keep working after I leave my current employer and they reassign my license.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 15:06:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-licensing-with-arcgis-pro-portal-when-using/m-p/1131604#M63434</guid>
      <dc:creator>DanNarsavage_IDWR</dc:creator>
      <dc:date>2022-01-07T15:06:03Z</dc:date>
    </item>
  </channel>
</rss>

