I am working on an automated way of publishing map services to a Federated ArcGIS Server. The users of the Portal come from our SAML provider. In my scripts I want to achieve the map service publishing automation with use of arcpy. To publish an item I obviously need to connect to Portal in first place in my python script. Considering presence of SAML how can I create a connection to Portal with arcpy so that the process could be performed as a scheduled windows batch job? What account would you recommend to use for this process? Should I create a dedicated batch-job account in SAML or actually try to publish via some Porta build-in account, but then would that be possible having SAML? What pattern for this process would you recommend?
Use a geodatabase user with create privileges to create the feature class.
Then run the python script as a windows scheduled task using a domain account such as the one running ArcGIS Server's and Portal for ArcGIS windows services.
You can knock out a quick model builder of it, export as python script and then setup the windows task.
Do you still have the built-in IAA account or any other administrative account that isn't SAML? If so, just create your GIS Server connection file using that account and then use it to publish the services.
Thanks Jonathan. So you are saying I should use CreateGISServerConnectionFile and pass into it my Federated server URL, build-in Portal account Login+Password and use such obtained .ags file to call UploadServiceDefinition_server ?