Skip to content

Instantly share code, notes, and snippets.

@umutkacar
umutkacar / okta_group_policy_mappings.sh
Created November 24, 2023 14:25
Iterate over Okta groups and print the policies mapped to them
#!/bin/bash
# Set Okta mount point
OKTA_MOUNT_POINT='auth/okta'
# Get list of Okta groups
OKTA_GROUPS=$(vault list -format=json ${OKTA_MOUNT_POINT}/groups | jq -r '.[]')
# Loop through the groups and print their policies
while IFS= read -r GROUP