Last active
September 21, 2023 10:44
-
-
Save chriseyre2000/0df46d5c1b64052f1cf1b86c2c432b01 to your computer and use it in GitHub Desktop.
Export permssions by group using auth0
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
auth0 login | |
auth0 roles list --json | jq ".[] | .id, .name" | sed 's/\"//g' | sed 'N;s/\n/,/;s/ /_/g' > roles.txt | |
while read p; do | |
group=`echo $p | awk -F, '{print $1}'` | |
filename=`echo $p | awk -F, '{print $2}'` | |
auth0 roles permissions list $group --json | jq ".[] | .permission_name" > $filename | |
done <roles.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment