HI,
I have 10.3.1 deployment and a 10.6.1 deployment where I am attempting to access the GIS servers via the following but I am unable to access the GIS servers. The documentation Working with different authentication schemes | ArcGIS for Developers doesn't say that you need to do anything special - yet it doesn't look like the internal token between Portal and ArcGIS Server is being created. Anyone else hit this? I'm on 1.6.0 of the API.
import arcgis;print(arcgis.__version__)
from arcgis.gis import GIS
from getpass import getpass
from arcgis.gis import admin
from arcgis.gis import server
import win32api #pywin32 # you need this for IWA
import kerberos_ssp
source = GIS(portal_url,verify_cert=False)
print("Logged in as: " + source.properties.user.username)
servers = source.admin.servers
gis_servers = source.admin.servers.list()
print(gis_servers)
This returns:
Logged in as: handf3@AKLC
Could not access the server at https://.../arcgis
Could not access the server at https://.../arcgis3Could not access the server at https://.../arcgis2
10.6.1 gives a slightly different result:
Logged in as: handf3@AKLC
<ServerManager at https://.../portal/portaladmin>
Unable to generate token. Unable to generate token for this server Could not access the server at https://.../arcgis
Did you solve this problem? I'm having the same 10.6.1 experience.
Heath
I have found Esri's documentation on IWA to be poor, or at least incomplete. Although the documentation says you can leave username and password off for IWA, in many situations I have found that leads to IWA not working. Putting empty strings or Python None for both username and password usually works for me.