@damienleick wrote: @Nash If I remove the base URL i have the same error (i have multiple script who have this base url and they work with no problem) The GetOrganization work Okay cool, so the base works. That makes life easier! Here's how I'd tshoot this: Does getOrganizationAdmins work as expected? I.E. your org num is good? If you run that for loop and print(id_user) instead of del admin, do you see the admin IDs you expect to see? If you get admin IDs that match admins in getOrganizationAdmin, try running with a try-except structure. I messed with Postman: if you have an admin ID that doesn't match an admin in the org, you also get a 404 error. What if you do a try-except like: with open('user_delete.csv', 'r') as csvfile:
users = csv.reader(csvfile, delimiter=',')
next(users)
for id_user in users:
try:
dashboard.admins.deleteOrganizationAdmin(MY_ORG, id_user)
except:
print(f"No admin {id_user} found.") If that works, do go back and clean up that except so it's not a blanket exception... This is quick and dirty.
... View more