I am trying to use the GIS Object in python to query against my AGOL.
Right now the only way I can get this to work is if I use .py 3.x
Is there a way to use this object from .py 2.7 with "import arcpy"?
from arcgis.gis import GIS
import arcgis
agol_username = 'xyz'
agol_password = 'xyz'
output_csv = r'C:\Users\ccc\Desktop\GIS_projects\AGOL_Python\UsersAboutToExpire.csv'
search_user = '*'
gis = GIS('https://xyz.maps.arcgis.com', agol_username, agol_password)
user_list = gis.users.search(query=search_user, max_users=2000)
roles = gis.users.roles.all()
rol_ids = {role.role_id: role.name for role in roles}
output = []