Publishing to Federated Server with SAML

596
4
04-26-2018 08:31 AM
SzymonPiskula1
New Contributor III

Hello

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?

Regards,

Szymon

0 Kudos
4 Replies
BillFox
MVP Frequent Contributor

Hello Szymon,

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.

-Bill

0 Kudos
JonathanQuinn
Esri Notable Contributor

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.

SzymonPiskula1
New Contributor III

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 ? 

0 Kudos
JonathanQuinn
Esri Notable Contributor

Yes, that's right. I think SAML will be difficult to manage in arcpy as that involves an external identity provider.