Last active
January 27, 2021 23:54
-
-
Save phi1ipp/fdc5e4094276d9fa956c02d166d2416e to your computer and use it in GitHub Desktop.
Provision Okta AppUser with external id #okta
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
OKTA_DOMAIN="your.okta.domain" | |
APP_ID="xxxxxxxxxxxxxxx" | |
while read -r line; | |
do | |
data="{ | |
\"id\": \"$line\", | |
\"scope\": \"USER\", | |
\"profile\": { | |
\"externalId\": \"$line\" | |
}, | |
\"credentials\": { | |
\"userName\": \"$line\" | |
} | |
}" | |
curl -X POST "https://${OKTA_DOMAIN}/api/v1/apps/${APP_ID}/users" \ | |
--header 'Accept: application/json' \ | |
--header 'Content-Type: application/json' \ | |
--header 'Authorization: SSWS xxxxxxxxxxxx-xxxxxxxxxxxxx' \ | |
--data-raw $data | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment