Unable to protect credentials by storing them locally for a standalone ArcGIS Server as per instructions at
Working with different authentication schemes | ArcGIS for Developers
""" The following snippet to create a profile DOES NOT WORK FOR STANDALONE ARCGIS SERVER https://developers.arcgis.com/python/guide/working-with-different-authentication-schemes/#Storing-your-credentials-locally """ from arcgis.gis import GIS server_gis = GIS(url="https://server.com:6443/arcgis", username='AGS_user', password='khjdfksjdfklj',profile='AGS_user') print("profile defined for {}".format(server_gis))
Is there a way to create profiles for standalone ArcGIS Server authentication using ArcGIS API for Python? we are not using portal.
Solved! Go to Solution.
In the meantime, I Would recommend you use keyring, it is installed with the arcgis API so its readily available.
The password is stored in Windows credentials manager and you will find them there besides the passwords from profiles.
There are two easy steps, store your password:
And to use the password:
I prefer to use the Group name to discern between environments like Test and Prod.
You can access stand-alone ArcGIS Servers that aren't part of a Portal using ArcGIS API for Python. But You cannot create profiles for standalone ArcGIS Server as in the case of connecting to a GIS Instance such as ArcGIS Online/ArcGIS Enterprise.
The documentation which you have mentioned in here is meant for connecting to a GIS Instance.
In order to connect to a stand-alone ArcGIS Sever you can use the following snippet
from arcgis.gis.server import Server
test = Server(url="https://gis.mysite.com/arcgis/admin", GIS=None, username="xxxxx", password="yyyyyy", verify_cert=False)
For more information you can refer to the documentation arcgis.gis.server module
Pattan Imran Khan - Thanks for confirming that.
What would it take for ArcGIS API for Python team to bring this missing functionality for standalone ArcGIS Server administration? I am pretty sure there are a considerable number of esri users using standalone ArcGIS Server and would like to automate ArcGIS Server adminstration using this api and authenticate in a more secure process.
In the meantime, I Would recommend you use keyring, it is installed with the arcgis API so its readily available.
The password is stored in Windows credentials manager and you will find them there besides the passwords from profiles.
There are two easy steps, store your password:
And to use the password:
I prefer to use the Group name to discern between environments like Test and Prod.