-
-
Save darrenjrobinson/e54d2ea783f4d286df73bf7f9ea62ec4 to your computer and use it in GitHub Desktop.
Parse MS Graph JSON Batch Responses
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
foreach ($jobRMResult in $getBatchRequestRM.responses) { | |
$jobRMResult.id | |
write-host -ForegroundColor blue "jobID: $($jobRMResult.id)" | |
if ($jobRMResult.body.value.count -gt 1){ | |
foreach ($entry in $jobRMResult.body.value){ | |
write-host -ForegroundColor cyan " $($entry)" | |
} | |
} else { | |
write-host -ForegroundColor cyan " $($jobRMResult.body.value)" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment