Last active
April 23, 2020 01:57
-
-
Save pkskelly/f02eab1f230293ef8ff3d20c5e02a697 to your computer and use it in GitHub Desktop.
Merge jq module to merge MS Flow JSON output with Azure AD user information
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
# Create a dictionary based on the $owner.id property from the owners array parameter | |
($owners | map(select(.id != null)) | map( {(.id): {displayName, userPrincipalName, mail}}) | add) as $dict | |
# Output each flow and append the the owner information from each dictionary entry | |
# using the flow's creator.userId property as the key | |
| $flows |.[].properties.creator |= . + $dict[.userId] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment