https://github.com/ramsailopal/oktasync
Syncing data from a csv file to a Okta user directory
https://github.com/ramsailopal/oktasync
csv okta python
Last synced: 5 months ago
JSON representation
Syncing data from a csv file to a Okta user directory
- Host: GitHub
- URL: https://github.com/ramsailopal/oktasync
- Owner: RamSailopal
- Created: 2025-03-13T18:34:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-13T18:48:29.000Z (about 1 year ago)
- Last Synced: 2025-04-05T11:32:40.106Z (12 months ago)
- Topics: csv, okta, python
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Okta Data Import

An example of extracting data out of a csv file and then importing it into Okta using the [Okta Python SDK](https://github.com/okta/okta-sdk-python)
Each line of user data is processed. A check is carried out to see if the user already exists or not and if not, the user is setup in the Okta user directory. A complete list of the users in the Okta directory is then output.
An alternative csv file import is also available within the Okta platform but such a method means that automation cannot be achieved,
## Raw Data
Example raw data is stored in the **okta/dump.csv** file where the first comma separated value is the forename, the second the surname and the last value the email address.
## Running the script
With Python3, Python3-venv and pip3 installed, run:
python3 -m venv .
bin/pip install -r requirements,txt
export OKTADOMAIN=""
export OKTATOKEN=""
bin/python3 okta/sync.py -f
file path signifies the path to dump.csv file
Further details on setting up an Okta API token can be found [here](https://developer.okta.com/docs/guides/create-an-api-token/main/)