I am using the Python package to create a script that should create AGO users.
When testing the package, I create the GIS object using my account details (I have admin role) and then create the new user, but an "Unable to create <username>" error is thrown.
When investigating the issue, it seems when the package sends the post request, the username is returned in the "notInvited" list and thus the user creation fails. I tried using a real email but it still fails.
I have searched the web for a while now and have found no solutions to this problem.
Code:
# school is replaced by my school name, xyz and yyy are my username and password
gis = GIS(url='https://school.maps.arcgis.com', username='xyz', password='yyy')
newuser = gis.users.create(
username='pythontest',
password='10@1232.adbsd.ADSF',
firstname='python',
lastname='test',
email='pythonTest@gmail.com',
)
Thank you in advance!