The below video will walk through migrating built-in named user accounts to enterprise named user accounts within ArcGIS Enterprise/ArcGIS Online using the attached scripts. The enterprise accounts can be SAML or, for ArcGIS Enterprise, Active Directory (IWA).
Note: My Esri training will not be maintained for AGOL accounts
The below script will print which users have Esri Access enabled. To maintain training, these users should be removed from the CSV and migrated manually. See the following link for more details for users that have Esri access enabled.
from arcgis.gis import GIS
gis = GIS('https://www.arcgis.com', username, password)
all_users = gis.users.search()
for user in all_users:
if user.esri_access == 'both':
print(user.username)