Skip to content

Instantly share code, notes, and snippets.

@chriseyre2000
Last active September 21, 2023 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriseyre2000/0df46d5c1b64052f1cf1b86c2c432b01 to your computer and use it in GitHub Desktop.
Save chriseyre2000/0df46d5c1b64052f1cf1b86c2c432b01 to your computer and use it in GitHub Desktop.
Export permssions by group using auth0
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