Automated service publishing to "secured" (web-tier authenticated) ArcGIS Enterprise

2495
4
05-28-2020 11:56 PM
LorenzMeyer1
Occasional Contributor

We are currently looking for a way on how to automate service publishment (from a *.aprx file) to an ArcGIS Portal 10.7.1 with python, but this seems not to be possible if the portal is secured with web tier authentication with basic-authentication (WebAdaptor on Apache Tomcat with LDAP).

 

We've taken a look at this example: MapImageSharingDraft—Sharing module | Documentation and tried it with our secured portal, but it fails on the "exportToSDDraft"-Function with the following error:

The "federatedServerUrl" in our case is a basic-auth protected URL, thus the server cannot be reached, because arcpy seems not to correctly handle the login.

sharing_draft.federatedServerUrl = "https://MyFederatedServerUrl.esri.com/server"

Without *.sddraft, no *.sd file and without *.sd file no service publishment possible, neither with arcpy nor with the Python API for ArcGIS (where you need a *.sd file to publish the item to portal).

Question: How to generate *.sddraft files with secured portal?

 

As I read in the documentation MapImageSharingDraft—Sharing module | Documentation the portal information is read from the portals page in ArcGIS Pro (Portal information is obtained from the Portals page in ArcGIS Pro.).

Question: Is it possible to publish *.aprx files from python without having ArcGIS Pro installed?

 

 

Then I found this one here: SignInToPortal—ArcPy Functions | Documentation 

With this function it should be possible to sign in to a portal, neither if it's in your portals page in ArcGIS Pro or not. But again, signing in to a secured portal throws an error. It seems that only Built-In Security Logins are allowed and not Enterprise logins.

Question: How to use arcpy.SignInToPortal() with secured portal?

 

In the past we already had a similiar way to automate publishing of map services to a standalone ArcGIS Server. Therefore we only needed the MXD and the service metainformatione generated in the *.sddraft file. The *.sddraft file could be generated inside ArcMap over the GUI. You just had to cancel the service publishment dialog and a *.sddraft was stored. This is no longer possible in ArcGIS Pro. The dialog where you have to specify all the meta information for the service like capabilities (FeatureServer, WMS ...) and Pooling (dedicated or shared, and instances) is not cancelable.

That means I would need to code every setting that is possible to do in the GUI, in the XML of the pregenerated *.sddraft. Is this really the way to go for Esri?

Question: Is there a better way to generate a *.sddraft file?

 

Thanks

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

triplicate of

https://community.esri.com/thread/254182-automated-service-publishing-to-secured-web-tier-authentica... 

please "Share" rather than posting in multiple places


... sort of retired...
0 Kudos
MarkoEinspieler1
Esri Contributor

Hi @DanPatterson,

you have posted following link to a thread:

https://community.esri.com/thread/254182-automated-service-publishing-to-secured-web-tier-authentica...

Unfortunately the thread is not available anymore... Do you have an idea how to find the thread?

Thanks in advance and best regards,

Marko

0 Kudos
DanPatterson
MVP Esteemed Contributor

You would have to contact the Community Managers (eg @MichelleMathias ) and they can track down the older threads from the archives


... sort of retired...
0 Kudos
MarkoEinspieler1
Esri Contributor

Thanks @DanPatterson! I'll get in touch with her.

0 Kudos