Is there no way to create GIS object connecting to an ArcGIS Online org, using the credentials of a user that has multi-factor authentication enabled? Our org requires administrators to use multi-factor authentication, but I can't find a way to log in to the org via the Python API. I keep getting this error:
If there's not a way to do it, is there a plan to add a mechanism to do so?
Hoi,
This issues is also very relevant for our organisation.
Do you maybe have an update for this item.
Jeroen Baltussen
I cannot run scripts to AGOL and I suspect MFA is the issue. Are there ways to utilize scripts with MFA implemented? I use to use scripts like below to access REST services, and generate tokens for the irritating "Token Required" message at REST endpoints for services I published while I am online:
params = {'f': 'pjson', 'username': userName, 'password': pw, 'referer': 'https://www.arcgis.com', 'expiration': 21600}
tokenURL = 'https://www.arcgis.com/sharing/rest/generateToken'
response = requests.post(tokenURL, data = params, verify = False)
token = response.json()['token']