AnsweredAssumed Answered

arcpy licensing with ArcGIS Pro/Portal when using service account

Question asked by agelfert on Dec 10, 2019
Latest reply on Dec 11, 2019 by agelfert

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.)


But when I try scheduling a script with Task Scheduler via batch file using a service account on a server, the script dies. 


When I run python cmd as service account and then try "import arcpy", I get:



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 message  - "A core license could not be found...".


I see there is a way to log in to Portal in Python... 


arcpy.SignInToPortal(arcpy.GetActivePortalURL(), 'username', 'password')



But I guess my service account first needs a Portal account. When I try to grant that as Portal Admin, I get :


One or more members are missing an email address and will not be added.


Oh c'mon!!! So do I now have to request an email address for my service account? Or is there another way to make this work? Help!