Skip to content
Reads ArcGIS Online users and promotes teachers (with certain usernames) to publishers.
Jupyter Notebook
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
PromoteTeachertoPublisher_vs3-GitHub.ipynb
README.md

README.md

promoteTeachersToPublishers

Reads ArcGIS Online users and promotes teachers (with certain usernames) to publishers.

Update SSO-created teacher account

As ArcGIS Online SSO assigns all new accounts to one role, this script can find certain differences in usernames and then changes those users' roles. The use case that drove this script requested inbound teachers be promoted to publishers while students remained as users in the system. Optionally, this script could be save to a .py file and set as a scheduled task.

This script returns all the members of an organization and then filters out:

  1. non-SSO usernames (assumes SSO usernames must end with underscore subdomain)
  2. usernames older than 1 week
  3. usernames that don't contain six consecutive digits. This is a condition in this specific use case that differentiates student usernames from teacher usernames. You will need to change the regular expression used to differentiate between the teacher and student accounts in your situation.

A teacher tag is added and qualifying username promoted to org_publisher.

YOU SHOULD UPDATE LINES: 6, 12, 20(use your own regex)

Script based on ArcGIS Online API for Python 1.5.1, Python 3.6, Anconda 4.4 -trbaker/November 2018

You can’t perform that action at this time.