Created
April 16, 2019 15:56
-
-
Save claudijd/a911d558b0eb8e8537da18c291a101a3 to your computer and use it in GitHub Desktop.
Script to poll app_metadata and group membership
This file contains hidden or 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
#!/usr/bin/env bash | |
# Pass in your BEARER_TOKEN to this script to make it dance | |
mkdir -p ./testing | |
while true; do | |
echo "$(date): Polling /api/v2/users/ad%7CMozilla-LDAP%7Cjclaudius and dumping app_metadata and groups to file" | |
curl -H "Authorization: Bearer $BEARER_TOKEN" "https://auth.mozilla.auth0.com/api/v2/users/ad%7CMozilla-LDAP%7Cjclaudius" 2> /dev/null | jq -r '"\(.app_metadata)|\(.groups)"' > ./testing/$(date +%s) | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment