Working with users and groups
We've covered working with services and items such as web maps, but you'll also need to manage users and groups as well. Examples we have utilized so far in this chapter have shown how the ArcGIS API for Python abstracts away much of the minutiae of connecting to Portal or ArcGIS Online and allows you to just get to work. User and group management is no different; we connect just as we have in previous examples to gain access.
Managing users
In Chapter 7, Scripting Administrative Tasks, we used PortalPy to pull user information out of our Portal. We can do the same thing with the ArcGIS API for Python, but in a modern, Pythonic fashion. Let's look at how we can easily pull user information from Portal:
import collections import time import pandas as pd from arcgis.gis import GIS
After we've imported the libraries we will need, we create a connection to our GIS and then perform a search for users whose username does not begin with esri_
. Note...