-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4071b32
commit 4b19150
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Okta-UD-Scripts | ||
Few scripts to operate on UD | ||
|
||
Python scripts that demonstrte use of Okta's REST APIs for Unviversl Directory. Description of each script | ||
|
||
1) activate_staged_users.py -> Activates all STAGED (Pending activation) users in the org. | ||
2) create_random_users.py -> Create N number of random users in org. Helpful in case when you want to create bunch of users for testing | ||
3) get_all_active_users.py -> Retrieve all active users from org and write them in csv | ||
4) get_app_assignment_events -> Capture app assignments done by admin, in csv file. | ||
5) set_attribute.py -> Set any attribute (attributeName in the script) to a value (attributeValue) for all users in org | ||
|
||
Last ud_script_template.py is a template. It has functions to make REST API calls (GET, GET paginated, POST, PUT and DELETE). | ||
This script can be used to create any use case. Test the use case in Python and use this script to create same flow using functions. | ||
|
||
Requirements to Run Script: | ||
|
||
1) Python 2.7 | ||
2) Python's requests libaray (run "pip install requests" from command line or shell). You may need t install pip i.e. Python's package | ||
manager on Windows system | ||
|
||
|
||
How to Run Script | ||
|
||
For first 5 script open the script in your favorite editor (e.g. Sublime) and set orgName including okta/oktapreview to your org e.g. | ||
"myorg.okta" or "myorg.oktapreview". If there are any required attribute such as N, attributeName, attributeValue at the top, update | ||
those to yoru need as well. | ||
|
||
In command prompt or shell navigate to folder where Python script is copied "cd ~/Documents/PythonScripts" and run the script e.g | ||
"python activate_staged_users.py" |