Hello,
I had been using Pro 2.7, but recently upgraded to 3.2. The code I had been using with 2.7 worked fine, but doesn't seem to work with 3.2 I'm connecting to GIS() using Built-In login, as described here:
Connect to ArcGIS Online using a built-in account > Connecting through ArcGIS Pro
https://developers.arcgis.com/python/guide/working-with-different-authentication-schemes/
To connect I have been using:
gis = GIS('pro'), or in some cases: gis = GIS('home')
and to get the token, I've been using:
auth_token = gis._con.token
which I found referenced in this community post, and elsewhere:
https://community.esri.com/t5/arcgis-api-for-python-questions/get-the-token-using-arcgis-python-api/td-p/876344
But these methods don't work anymore, and do not return a token:
gis = GIS('pro')
print("Logged in as: " + gis.properties.user.username)
print('token='+str(gis._con.token))
Returns:
Logged in as: myUsername
token=None
gis = GIS('home')
print("Logged in as: " + gis.properties.user.username)
print('token='+str(gis._con.token))
Returns:
Logged in as: myUsername
token=None
Can anyone offer any insight?