Select to view content in your preferred language

Web Tool Credentials

1094
2
Jump to solution
03-16-2021 09:27 AM
MarkCederholm
Frequent Contributor

I have a web tool that uses both arcpy and Python API.  The arcgis.gis.GIS object correctly sees the user of the web tool, but arcpy sees the owner of the ArcSOC process.  I would like arcpy to sign into Portal as the web tool user [so that layers in a Pro project will be visible, which I don't want to share with Everyone].  Is there any way to do this?

0 Kudos
1 Solution

Accepted Solutions
MarkCederholm
Frequent Contributor

I ended up creating a special account and storing the encrypted password.  I'm not incredibly happy with that approach, but it at least prevents hard-coding credentials.

View solution in original post

0 Kudos
2 Replies
nita14
by
Frequent Contributor

Hi Mark,

As far as I know, you can not do it. You can try to create a 'proxy account' on your portal. Share the content with that user. Finally, hardcode/hash/upload from extrenal ressource its credentials in arcpy using:

https://desktop.arcgis.com/en/arcmap/10.7/tools/server-toolbox/sign-in-to-portal.htm

BR,

Adam

0 Kudos
MarkCederholm
Frequent Contributor

I ended up creating a special account and storing the encrypted password.  I'm not incredibly happy with that approach, but it at least prevents hard-coding credentials.

0 Kudos